2 <script src=
"../../../resources/testharness.js"></script>
3 <script src=
"../../../resources/testharnessreport.js"></script>
9 class Foo
extends HTMLDivElement
{
10 static staticFunction () { return "static function called"; }
13 var customFoo
= document
.registerElement("custom-foo", {
14 prototype: Foo
.prototype,
17 assert_equals(Object
.getPrototypeOf(customFoo
), Foo
,
18 'generated constructor prototype should be base element constructor');
20 assert_equals(customFoo
.staticFunction(), "static function called",
21 'static function should be called using inherited element');
23 assert_equals(Object
.getPrototypeOf(customFoo
).__proto__
, HTMLDivElement
,
24 'prototype chain should have base constructor\'s prototype');
25 }, 'should inherit from passed constructor');