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

Side by Side Diff: sky/tests/mutation-observer/delivery-order.sky

Issue 879733002: Replace createTextNode with new Text(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
1 <html> 1 <html>
2 <import src="../resources/chai.sky" /> 2 <import src="../resources/chai.sky" />
3 <import src="../resources/mocha.sky" /> 3 <import src="../resources/mocha.sky" />
4 <script> 4 <script>
5 describe('MutationObserver', function() { 5 describe('MutationObserver', function() {
6 it('should deliver in order of creation', function(done) { 6 it('should deliver in order of creation', function(done) {
7 var order = []; 7 var order = [];
8 var observers = []; 8 var observers = [];
9 9
10 function setUpOrdering(num) { 10 function setUpOrdering(num) {
(...skipping 10 matching lines...) Expand all
21 observers[2].observe(div, {characterData: true, subtree: true}); 21 observers[2].observe(div, {characterData: true, subtree: true});
22 observers[1].observe(div, {attributes: true}); 22 observers[1].observe(div, {attributes: true});
23 observers[7].observe(div, {childList: true}); 23 observers[7].observe(div, {childList: true});
24 observers[4].observe(div, {attributes: true}); 24 observers[4].observe(div, {attributes: true});
25 observers[9].observe(div, {attributes: true}); 25 observers[9].observe(div, {attributes: true});
26 observers[0].observe(div, {childList: true}); 26 observers[0].observe(div, {childList: true});
27 observers[5].observe(div, {attributes: true}); 27 observers[5].observe(div, {attributes: true});
28 observers[6].observe(div, {characterData: true, subtree: true}); 28 observers[6].observe(div, {characterData: true, subtree: true});
29 observers[8].observe(div, {attributes: true}); 29 observers[8].observe(div, {attributes: true});
30 div.setAttribute('foo', 'bar'); 30 div.setAttribute('foo', 'bar');
31 div.appendChild(document.createTextNode('hello')); 31 div.appendChild(new Text('hello'));
32 div.firstChild.textContent = 'goodbye'; 32 div.firstChild.textContent = 'goodbye';
33 setTimeout(function() { 33 setTimeout(function() {
34 assert.deepEqual(order, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); 34 assert.deepEqual(order, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
35 done(); 35 done();
36 }, 0); 36 }, 0);
37 }); 37 });
38 }); 38 });
39 </script> 39 </script>
40 </html> 40 </html>
OLDNEW
« no previous file with comments | « sky/tests/editing/delete_block_contents.sky ('k') | sky/tests/mutation-observer/mutation-callback-non-element-crash.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698