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 var observer = new MutationObserver(function(mutations) { }); | 6 var observer = new MutationObserver(function(mutations) { }); |
7 | 7 |
8 it('should have methods', function() { | 8 it('should have methods', function() { |
9 assert.equal(typeof observer.observe, 'function'); | 9 assert.equal(typeof observer.observe, 'function'); |
10 assert.equal(typeof observer.disconnect, 'function'); | 10 assert.equal(typeof observer.disconnect, 'function'); |
11 }); | 11 }); |
12 it('should throw with incorrect constructor args', function() { | 12 it('should throw with incorrect constructor args', function() { |
13 assert.throw(function() { | 13 assert.throw(function() { |
14 new MutationObserver({ handleEvent: function() {} }); | 14 new MutationObserver({ handleEvent: function() {} }); |
15 }, TypeError); | 15 }, TypeError); |
16 assert.throw(function() { | 16 assert.throw(function() { |
17 new MutationObserver({}); | 17 new MutationObserver({}); |
18 }, TypeError); | 18 }, TypeError); |
19 assert.throw(function() { | 19 assert.throw(function() { |
20 new MutationObserver(42); | 20 new MutationObserver(42); |
21 }, TypeError); | 21 }, TypeError); |
22 assert.throw(function() { | 22 assert.throw(function() { |
23 new MutationObserver("foo"); | 23 new MutationObserver("foo"); |
24 }, TypeError); | 24 }, TypeError); |
25 }); | 25 }); |
26 }); | 26 }); |
27 </script> | 27 </script> |
28 </html> | 28 </html> |
OLD | NEW |