OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <unknown> | |
8 <script> | |
9 | |
10 if (window.testRunner) { | |
11 testRunner.dumpAsText(); | |
12 testRunner.waitUntilDone(); | |
13 } | |
14 | |
15 window.jsTestIsAsync = true; | |
16 | |
17 function onDOMNodeRemoved(e) { | |
18 try { | |
19 e.srcElement.insertAdjacentHTML('afterbegin', ' '); | |
20 document.execCommand('FontSizeDelta', false, '1px'); | |
21 } catch(e) {} | |
leviw_travelin_and_unemployed
2015/05/05 18:21:40
Is this try/catch necessary?
sof
2015/05/05 19:47:32
An alternative is to add an Element type check, wh
| |
22 } | |
23 document.addEventListener("DOMNodeRemoved", onDOMNodeRemoved, false); | |
24 | |
25 function runTest() { | |
26 document.designMode = document.designMode == "on" ? "off" : "on"; | |
27 document.execCommand("SelectAll", false) | |
28 var unknown = document.getElementsByTagName("unknown")[0]; | |
29 unknown.textContent = "sss"; | |
30 unknown.outerHTML = ""; | |
31 document.execCommand("SelectAll", false); | |
32 // Put description() here so as to not upset test condition. | |
33 description("Verify that changing the style over an unknown element does not crash."); | |
34 finishJSTest(); | |
35 } | |
36 | |
37 window.onload = runTest; | |
leviw_travelin_and_unemployed
2015/05/05 18:21:40
If you move this script tag to the end, you probab
sof
2015/05/05 19:47:32
Moved stuff around a bit to avoid having to trigge
| |
38 </script> | |
39 <textarea> | |
40 </body> | |
leviw_travelin_and_unemployed
2015/05/05 18:21:40
Nit: </body> and </html> aren't necessary.
sof
2015/05/05 19:47:32
Just following local convention :)
| |
41 </html> | |
OLD | NEW |