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

Side by Side Diff: sky/tests/mutation-observer/mutate-during-delivery.html

Issue 685623002: Move the tests from .html to .sky (Closed) Base URL: https://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
(Empty)
1 <html>
2 <link rel="import" href="../resources/chai.html" />
3 <link rel="import" href="../resources/mocha.html" />
4 <script>
5 describe('MutationObserver', function() {
6 it('should not interrupt delivery order on getting mutations during delivery', function(done) {
7 function finish() {
8 assert.deepEqual(order, [1, 3, 2]);
9 done();
10 }
11
12 var order = [];
13 var div = document.createElement('div');
14
15 var observer1 = new MutationObserver(function(mutations) {
16 order.push(1);
17 div.appendChild(document.createElement('span'));
18 });
19 var observer2 = new MutationObserver(function(mutations) {
20 order.push(2);
21 });
22 var observer3 = new MutationObserver(function(mutations) {
23 order.push(3);
24 });
25
26 observer1.observe(div, {attributes: true});
27 observer2.observe(div, {childList: true});
28 observer3.observe(div, {attributes: true});
29 div.setAttribute('foo', 'bar');
30 setTimeout(finish, 0);
31 });
32 });
33 </script>
34 </html>
OLDNEW
« no previous file with comments | « sky/tests/mutation-observer/document-fragment-insertion.sky ('k') | sky/tests/mutation-observer/mutate-during-delivery.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698