| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 | 3 |
| 4 <head> | 4 <head> |
| 5 <meta charset="EUC-JP"> | 5 <meta charset="EUC-JP"> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 if (window.testRunner) | 8 if (window.testRunner) |
| 9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
| 10 | 10 |
| 11 function test() | 11 function test() |
| 12 { | 12 { |
| 13 var backslashDivElement = document.getElementById("backslash"); | 13 var backslashDivElement = document.getElementById("backslash"); |
| 14 getSelection().collapse(backslashDivElement, 0); |
| 14 getSelection().extend(backslashDivElement, 1); | 15 getSelection().extend(backslashDivElement, 1); |
| 15 document.execCommand("Transpose"); | 16 document.execCommand("Transpose"); |
| 16 | 17 |
| 17 // 92 is the char code of a backslash. | 18 // 92 is the char code of a backslash. |
| 18 var backslash = 92; | 19 var backslash = 92; |
| 19 if (backslash == backslashDivElement.innerHTML.charCodeAt(0) && backslash ==
backslashDivElement.innerHTML.charCodeAt(1)) | 20 if (backslash == backslashDivElement.innerHTML.charCodeAt(0) && backslash ==
backslashDivElement.innerHTML.charCodeAt(1)) |
| 20 document.getElementById("result").innerHTML = "PASS"; | 21 document.getElementById("result").innerHTML = "PASS"; |
| 21 } | 22 } |
| 22 | 23 |
| 23 </script> | 24 </script> |
| 24 </head> | 25 </head> |
| 25 | 26 |
| 26 <body onload="test()"> | 27 <body onload="test()"> |
| 27 | 28 |
| 28 <div id="backslash" contentEditable="true">\\</div> | 29 <div id="backslash" contentEditable="true">\\</div> |
| 29 | 30 |
| 30 <div id="result">FAIL</div> | 31 <div id="result">FAIL</div> |
| 31 | 32 |
| 32 </body> | 33 </body> |
| 33 | 34 |
| 34 </html> | 35 </html> |
| OLD | NEW |