Added test for step 2, 14 in define element.

Test for step 2.
- Tests cases when HTMLElement, HTMLButtonElement
  is passed as constructor. Step 2 should throw
  TypeError, but it passes without errors.
- Passing author-defined custom element constructors
  created via class extends HTMLElement {} passes
  this step without TypeError.
- Passing JavaScript class Set fails during upgrade.

Test for step 14.
- If Type(prototype) is an Object, and connectedCallback
  is not defined and not Callable, it throws TypeError.
- If Type(prototype) is an Object, and disconnectedCallback
  is not defined and not Callable, it throws TypeError.
- If attributeChangedCallback is not Callable is not
  undefined and not Callable, it throws TypeError.
- If any step in the first set of steps in 14 throws,
  it rethrows that exception and terminates the
  algorithm.

BUG=594918

Review-Url: https://codereview.chromium.org/2089383003
Cr-Commit-Position: refs/heads/master@{#403862}
1 file changed