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

Side by Side Diff: packages/web_components/test/interop_test.html

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 months 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="X-UA-Compatible" content="IE=edge">
5 <meta name="dart.unittest" content="full-stack-traces">
6 <title> interop_test.html </title>
7 <style>
8 .unittest-table { font-family:monospace; border:1px; }
9 .unittest-pass { background: #6b3;}
10 .unittest-fail { background: #d55;}
11 .unittest-error { background: #a11;}
12 </style>
13 <script src="/packages/web_components/webcomponents.js"></script>
14 <script src="/packages/web_components/dart_support.js"></script>
15 <script src="/packages/web_components/interop_support.js"></script>
16 </head>
17 <body>
18 <h1> Running interop_test </h1>
19 <script>
20 var counter = 0;
21 var A = function() {};
22 A.prototype = Object.create(HTMLElement.prototype);
23 A.prototype.inc = function() { this.x = counter++; };
24 A.prototype.createdCallback = function() { this.inc(); };
25
26 var B = function() {};
27 B.prototype = Object.create(HTMLDivElement.prototype);
28 B.prototype.createdCallback = function() { this.x = counter++; };
29 B.extends = 'div';
30
31 var D = function() {};
32 D.prototype = Object.create(HTMLElement.prototype);
33 D.prototype.inc = function() { this.x = counter++; };
34 D.prototype.createdCallback = function() { this.inc(); };
35
36 var E = { prototype: Object.create(D.prototype) };
37 E.prototype.inc2 = function() {
38 this.y = counter++;
39 };
40 E.prototype.createdCallback = function() {
41 D.prototype.createdCallback.call(this);
42 this.inc2();
43 };
44
45 document.registerElement('x-a', A);
46 document.registerElement('x-b', B);
47 document.registerElement('x-d', D);
48 document.registerElement('x-e', E);
49
50 function registerC() {
51 var proto = Object.create(HTMLElement.prototype, {
52 inc: { value: function() { this.x = counter++; } },
53 createdCallback: {
54 value: function() { this.inc(); },
55 configurable: true},
56 });
57 document.registerElement('x-c', {prototype: proto});
58 }
59 function addA() {
60 document.body.appendChild(document.createElement('x-a'));
61 }
62 function addB() {
63 document.body.appendChild(document.createElement('div', 'x-b'));
64 }
65 function addC() {
66 document.body.appendChild(document.createElement('x-c'));
67 }
68 function addD() {
69 document.body.appendChild(document.createElement('x-d'));
70 }
71 function addE() {
72 document.body.appendChild(document.createElement('x-e'));
73 }
74 </script>
75 <x-a id="i1"></x-a>
76 <div is="x-b" id="i2"></div>
77 <x-c id="i3"></x-c>
78 <x-d id="i4"></x-d>
79 <script type="text/javascript"
80 src="/root_dart/tools/testing/dart/test_controller.js"></script>
81 <script type="application/dart" src="interop_test.dart"></script>
82 <script type="text/javascript" src="/packages/browser/dart.js"></script>
83 </body>
84 </html>
OLDNEW
« no previous file with comments | « packages/web_components/test/interop_test.dart ('k') | packages/web_components/test/location_wrapper_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698