| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
| 5 <script src="../../../resources/js-test.js"></script> | 5 <script src="../../../resources/js-test.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <p id=description></p> | 8 <p id=description></p> |
| 9 <div id="console"></div> | 9 <div id="console"></div> |
| 10 <script> | 10 <script> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 mutations = null; | 46 mutations = null; |
| 47 observer.disconnect(); | 47 observer.disconnect(); |
| 48 charDataNode.textContent = 'baz'; | 48 charDataNode.textContent = 'baz'; |
| 49 setTimeout(checkNotDeliveredAndMutateMultiple, 0); | 49 setTimeout(checkNotDeliveredAndMutateMultiple, 0); |
| 50 } | 50 } |
| 51 | 51 |
| 52 function checkNotDeliveredAndMutateMultiple() { | 52 function checkNotDeliveredAndMutateMultiple() { |
| 53 debug('...observer.disconnect() should prevent further delivery of mutat
ions.'); | 53 debug('...observer.disconnect() should prevent further delivery of mutat
ions.'); |
| 54 | 54 |
| 55 shouldBe('mutations', 'null'); | 55 shouldBe('mutations', 'null'); |
| 56 charDataNode = document.createComment(); | 56 charDataNode = document.createComment(''); |
| 57 observer.observe(charDataNode, { characterData: true }); | 57 observer.observe(charDataNode, { characterData: true }); |
| 58 charDataNode.textContent = 'foo'; | 58 charDataNode.textContent = 'foo'; |
| 59 charDataNode.textContent = 'bar'; | 59 charDataNode.textContent = 'bar'; |
| 60 setTimeout(finish); | 60 setTimeout(finish); |
| 61 } | 61 } |
| 62 | 62 |
| 63 function finish() { | 63 function finish() { |
| 64 debug('...re-observing after disconnect works with the same observer.'); | 64 debug('...re-observing after disconnect works with the same observer.'); |
| 65 | 65 |
| 66 shouldBe('mutations.length', '2'); | 66 shouldBe('mutations.length', '2'); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 else | 315 else |
| 316 finishJSTest(); | 316 finishJSTest(); |
| 317 } | 317 } |
| 318 | 318 |
| 319 description('Test WebKitMutationObserver.observe on CharacterData nodes'); | 319 description('Test WebKitMutationObserver.observe on CharacterData nodes'); |
| 320 | 320 |
| 321 runNextTest(); | 321 runNextTest(); |
| 322 </script> | 322 </script> |
| 323 </body> | 323 </body> |
| 324 </html> | 324 </html> |
| OLD | NEW |