Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / custom / class-side-inheritance.html
blob11177c004857944017ed8fdc8301d998fae81810
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <body>
5 <script>
6 test(function () {
7 "use strict";
9 class Foo extends HTMLDivElement {
10 static staticFunction () { return "static function called"; }
13 var customFoo = document.registerElement("custom-foo", {
14 prototype: Foo.prototype,
15 });
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');
26 </script>