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