OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../js/resources/js-test-pre.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <div id="host"></div> | 6 <div id="host"></div> |
7 <script> | 7 <script> |
8 description("Ensures that DOMCharacterDataModified isn't fired inside shadows.")
; | 8 description("Ensures that DOMCharacterDataModified isn't fired inside shadows.")
; |
9 var fired = false; | 9 var fired = false; |
10 var host = document.getElementById("host"); | 10 var host = document.getElementById("host"); |
11 var shadow = new WebKitShadowRoot(host); | 11 var shadow = new WebKitShadowRoot(host); |
12 var div = document.createElement("div"); | 12 var div = document.createElement("div"); |
13 div.addEventListener("DOMCharacterDataModified", function(evt) { | 13 div.addEventListener("DOMCharacterDataModified", function(evt) { |
14 fired = true; | 14 fired = true; |
15 }, false); | 15 }, false); |
16 | 16 |
17 shadow.appendChild(div); | 17 shadow.appendChild(div); |
18 div.innerHTML = "Hello, "; | 18 div.innerHTML = "Hello, "; |
19 div.firstChild.appendData("World!"); | 19 div.firstChild.appendData("World!"); |
20 shouldBeFalse("fired"); | 20 shouldBeFalse("fired"); |
21 shouldBe("div.innerHTML", "'Hello, World!'"); | 21 shouldBe("div.innerHTML", "'Hello, World!'"); |
22 </script> | 22 </script> |
23 <script src="../../js/resources/js-test-post.js"></script> | 23 <script src="../../js/resources/js-test-post.js"></script> |
24 </body> | 24 </body> |
25 </html> | 25 </html> |
OLD | NEW |