From ac12d9a15df23cf25cbfb904902dad2bd6dfdf6a Mon Sep 17 00:00:00 2001 From: Edgar Chen Date: Thu, 27 Oct 2016 05:37:45 +0800 Subject: [PATCH] Fix tests for customized built-in elements in custom-elements/htmlconstructor/newtarget.html (#4082) According to the spec, https://html.spec.whatwg.org/multipage/dom.html#htmlconstructor, the fallback prototype of customized built-in element is the interface prototype object from NewTarget's realm, instead of the interface object. --- custom-elements/htmlconstructor/newtarget.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom-elements/htmlconstructor/newtarget.html b/custom-elements/htmlconstructor/newtarget.html index 67cf0e8fc6127c..ab43803c244e5f 100644 --- a/custom-elements/htmlconstructor/newtarget.html +++ b/custom-elements/htmlconstructor/newtarget.html @@ -101,9 +101,9 @@ function TestElement() { const o = Reflect.construct(w.HTMLParagraphElement, [], new.target); - assert_equals(Object.getPrototypeOf(o), window.HTMLParagraphElement, + assert_equals(Object.getPrototypeOf(o), window.HTMLParagraphElement.prototype, "Must use the HTMLParagraphElement from the realm of NewTarget"); - assert_not_equals(Object.getPrototypeOf(o), w.HTMLParagraphElement, + assert_not_equals(Object.getPrototypeOf(o), w.HTMLParagraphElement.prototype, "Must not use the HTMLParagraphElement from the realm of the active function object (w.HTMLParagraphElement)"); return o;