OLD | NEW |
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 pass the callback and observer arguments', function(done) { | 6 it('should pass the callback and observer arguments', function(done) { |
7 var mutationObserver = new MutationObserver(function(mutations, observer
) { | 7 var mutationObserver = new MutationObserver(function(mutations, observer
) { |
8 assert.equal(this, mutationObserver); | 8 assert.equal(this, mutationObserver); |
9 assert.equal(mutationObserver, observer); | 9 assert.equal(mutationObserver, observer); |
10 done(); | 10 done(); |
11 }); | 11 }); |
12 var div = document.createElement('div'); | 12 var div = document.createElement('div'); |
13 mutationObserver.observe(div, {attributes: true}); | 13 mutationObserver.observe(div, {attributes: true}); |
14 div.setAttribute('foo', 'bar'); | 14 div.setAttribute('foo', 'bar'); |
15 }); | 15 }); |
16 }); | 16 }); |
17 </script> | 17 </script> |
18 </html> | 18 </html> |
OLD | NEW |