forked from firka/flutter
Improve custom-elements/generated-constructor.sky test.
We should inherit from HTMLElement, Sky (and blink) don't currently enforce this but they probably should. We should also explicitly check that the prototype is what we expect. TBR=eseidel@chromium.org Review URL: https://codereview.chromium.org/809183002
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<script>
|
||||
describe("Custom element constructor", function() {
|
||||
it("should inherit from the passed constructor", function() {
|
||||
class TestElementClass {
|
||||
class TestElementClass extends HTMLElement {
|
||||
static test() { return 10; }
|
||||
}
|
||||
var TestElement = document.registerElement("test-element-1", {
|
||||
@@ -12,6 +12,7 @@ describe("Custom element constructor", function() {
|
||||
});
|
||||
assert.isFunction(TestElement.test);
|
||||
assert.equal(TestElement.test(), 10);
|
||||
assert.equal(Object.getPrototypeOf(TestElement), TestElementClass);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user