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

Side by Side Diff: sky/tests/mutation-observer/clear-transient-without-delivery.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('Transient registrations', function() { 5 describe('Transient registrations', function() {
6 it('should be cleared even without delivery', function(done) { 6 it('should be cleared even without delivery', function(done) {
7 var mutationsDelivered = false; 7 var mutationsDelivered = false;
8 var observer = new MutationObserver(function(mutations) { 8 var observer = new MutationObserver(function(mutations) {
9 mutationsDelivered = true; 9 mutationsDelivered = true;
10 }); 10 });
11 var div = document.createElement('div'); 11 var div = document.createElement('div');
12 var span = div.appendChild(document.createElement('span')); 12 var span = div.appendChild(document.createElement('span'));
13 observer.observe(div, {attributes: true, subtree: true}); 13 observer.observe(div, {attributes: true, subtree: true});
14 div.removeChild(span); 14 div.removeChild(span);
15 setTimeout(function() { 15 setTimeout(function() {
16 // By the time this function runs the transient registration should 16 // By the time this function runs the transient registration should
17 // be cleared, so we expect not to be notified of this attribute 17 // be cleared, so we expect not to be notified of this attribute
18 // mutation. 18 // mutation.
19 span.setAttribute('bar', 'baz'); 19 span.setAttribute('bar', 'baz');
20 setTimeout(function() { 20 setTimeout(function() {
21 assert.notOk(mutationsDelivered); 21 assert.notOk(mutationsDelivered);
22 done(); 22 done();
23 }, 0); 23 }, 0);
24 }, 0); 24 }, 0);
25 }); 25 });
26 }); 26 });
27 </script> 27 </script>
28 </html> 28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698