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

Side by Side Diff: sky/tests/custom-elements/constructor-calls-created-synchronously.sky

Issue 694423002: Replace <link rel="import"> with <import> (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
1 <html> 1 <html>
2 <link rel="import" href="../resources/chai.sky" /> 2 <import src="../resources/chai.sky" />
3 <link rel="import" href="../resources/mocha.sky" /> 3 <import src="../resources/mocha.sky" />
4 <body> 4 <body>
5 <div id="container"></div> 5 <div id="container"></div>
6 <script> 6 <script>
7 describe('Custom element constructors', function() { 7 describe('Custom element constructors', function() {
8 it('should run the createdCallback synchronously', function() { 8 it('should run the createdCallback synchronously', function() {
9 var proto = Object.create(HTMLElement.prototype); 9 var proto = Object.create(HTMLElement.prototype);
10 var ncallbacks = 0; 10 var ncallbacks = 0;
11 proto.createdCallback = function () { 11 proto.createdCallback = function () {
12 ncallbacks++; 12 ncallbacks++;
13 }; 13 };
14 var A = document.registerElement('x-a', {prototype: proto}); 14 var A = document.registerElement('x-a', {prototype: proto});
15 var x = new A(); 15 var x = new A();
16 assert.equal(ncallbacks, 1); 16 assert.equal(ncallbacks, 1);
17 }); 17 });
18 }); 18 });
19 </script> 19 </script>
20 </body> 20 </body>
21 </html> 21 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698