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

Side by Side Diff: sky/tests/mutation-observer/disconnect-cancel-pending.sky

Issue 920343002: Delete Sky tests that we're not going to run with Dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
(Empty)
1 <html>
2 <import src="../resources/chai.sky" />
3 <import src="../resources/mocha.sky" />
4 <script>
5 describe('MutationObserver.disconnect', function() {
6 it('should cancel pending delivery', function(done) {
7 var mutations;
8 var observer;
9 var div;
10
11 function start() {
12 mutations = null;
13 div = document.createElement('div');
14
15 observer = new MutationObserver(function(m) {
16 mutations = m;
17 });
18
19 observer.observe(div, { attributes: true });
20 div.setAttribute('foo', 'bar');
21 observer.disconnect();
22 setTimeout(next, 0);
23 }
24
25 function next() {
26 // Disconnecting should cancel any pending delivery...
27 assert.equal(mutations, null);
28 observer.observe(div, { attributes: true });
29 div.setAttribute('bar', 'baz');
30 setTimeout(finish, 0);
31 }
32
33 function finish() {
34 // ...and re-observing should not see any of the previously-generate d records.
35 assert.equal(mutations.length, 1);
36 assert.equal(mutations[0].attributeName, "bar");
37 done();
38 }
39
40 start();
41 });
42 });
43 </script>
44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698