Add tests for new function error messages

No longer use querySelector or querySelectorAll on markup parsed via DOMParser.