|  | <html> | 
|  | <import src="../resources/chai.sky" /> | 
|  | <import src="../resources/mocha.sky" /> | 
|  | <script> | 
|  | describe('MutationObserver', function() { | 
|  | it('should not invoke callbacks when appending a script', function() { | 
|  | var mutationsDelivered = false; | 
|  | function callback(mutations) { | 
|  | mutationsDelivered = true; | 
|  | } | 
|  |  | 
|  | var observer = new MutationObserver(callback); | 
|  | var div = document.createElement('div'); | 
|  | observer.observe(div, {attributes: true}); | 
|  | div.setAttribute('foo', 'bar'); | 
|  | assert.notOk(mutationsDelivered); | 
|  | var scriptDidRun = false; | 
|  | var script = document.createElement('script'); | 
|  | script.textContent = 'scriptDidRun = true'; | 
|  | assert.notOk(scriptDidRun); | 
|  | document.documentElement.appendChild(script); | 
|  | assert.notOk(scriptDidRun); | 
|  | assert.notOk(mutationsDelivered); | 
|  | }); | 
|  | }); | 
|  | </script> | 
|  | </html> |