Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: sky/tests/custom-elements/generated-constructor.sky

Issue 809183002: Improve custom-elements/generated-constructor.sky test. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <import src="../resources/mocha.sky" /> 2 <import src="../resources/mocha.sky" />
3 <import src="../resources/chai.sky" /> 3 <import src="../resources/chai.sky" />
4 <script> 4 <script>
5 describe("Custom element constructor", function() { 5 describe("Custom element constructor", function() {
6 it("should inherit from the passed constructor", function() { 6 it("should inherit from the passed constructor", function() {
7 class TestElementClass { 7 class TestElementClass extends HTMLElement {
8 static test() { return 10; } 8 static test() { return 10; }
9 } 9 }
10 var TestElement = document.registerElement("test-element-1", { 10 var TestElement = document.registerElement("test-element-1", {
11 prototype: TestElementClass.prototype, 11 prototype: TestElementClass.prototype,
12 }); 12 });
13 assert.isFunction(TestElement.test); 13 assert.isFunction(TestElement.test);
14 assert.equal(TestElement.test(), 10); 14 assert.equal(TestElement.test(), 10);
15 assert.equal(Object.getPrototypeOf(TestElement), TestElementClass);
15 }); 16 });
16 }); 17 });
17 </script> 18 </script>
18 </html> 19 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698