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

Side by Side Diff: sky/tests/mutation-observer/script-append.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 <script> 4 <script>
5 describe('MutationObserver', function() { 5 describe('MutationObserver', function() {
6 it('should not invoke callbacks when appending a script', function() { 6 it('should not invoke callbacks when appending a script', function() {
7 var mutationsDelivered = false; 7 var mutationsDelivered = false;
8 function callback(mutations) { 8 function callback(mutations) {
9 mutationsDelivered = true; 9 mutationsDelivered = true;
10 } 10 }
11 11
12 var observer = new MutationObserver(callback); 12 var observer = new MutationObserver(callback);
13 var div = document.createElement('div'); 13 var div = document.createElement('div');
14 observer.observe(div, {attributes: true}); 14 observer.observe(div, {attributes: true});
15 div.setAttribute('foo', 'bar'); 15 div.setAttribute('foo', 'bar');
16 assert.notOk(mutationsDelivered); 16 assert.notOk(mutationsDelivered);
17 var scriptDidRun = false; 17 var scriptDidRun = false;
18 var script = document.createElement('script'); 18 var script = document.createElement('script');
19 script.textContent = 'scriptDidRun = true'; 19 script.textContent = 'scriptDidRun = true';
20 assert.notOk(scriptDidRun); 20 assert.notOk(scriptDidRun);
21 document.documentElement.appendChild(script); 21 document.documentElement.appendChild(script);
22 assert.notOk(scriptDidRun); 22 assert.notOk(scriptDidRun);
23 assert.notOk(mutationsDelivered); 23 assert.notOk(mutationsDelivered);
24 }); 24 });
25 }); 25 });
26 </script> 26 </script>
27 </html> 27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698