Make arguments to insertAdjacent{Text,Element} non-optional

In https://codereview.chromium.org/109273003/ the arguments to
insertAdjacentHTML were made non-optional. Even though
insertAdjacent{Text,Element} is not in any spec yet, it's reasonable
that they should behave similarly, if ever spec'ed.

Since there's already (still necessary) error reporting at lower
levels, the only real functional difference by this change is that:

  element.insertAdjacentText('beforeEnd')

will now throw TypeError instead of appending the string 'undefined'
to the element's text content. The other cases will just get more
descriptive error messages, like:

  "2 arguments required, but only 0 present."

instead of:

  "The node provided is null."

when both arguments are missing.

Also align the insertAdjacent{HTML,Element,Text}.html tests to look
and behave similarly.

IE10 passes all three with slightly different error message output.

R=ojan@chromium.org
BUG=342754

Review URL: https://codereview.chromium.org/146313006

git-svn-id: svn://svn.chromium.org/blink/trunk@166941 bbb929c8-8fbe-4397-9dbb-9b2b20218538
6 files changed
tree: e889d4610ac6acc866b0fc84ecb832b4ce0f6321
  1. third_party/