| OLD | NEW |
| 1 <!DOCTYPE HTML FORCE QUIRKSMODE> | 1 <!DOCTYPE HTML FORCE QUIRKSMODE> |
| 2 <body style="zoom: 200%"> | 2 <body style="zoom: 200%"> |
| 3 <p style="font-size:16px">Test to make sure that pasting text with a font size i
nto a quirks mode | 3 <p style="font-size:16px">Test to make sure that pasting text with a font size i
nto a quirks mode |
| 4 document that is zoomed does not alter the font size.</p> | 4 document that is zoomed does not alter the font size.</p> |
| 5 <div contentEditable="true" id="test">Paste Here: </div> | 5 <div contentEditable="true" id="test">Paste Here: </div> |
| 6 <div id="results"></div> | 6 <div id="results"></div> |
| 7 </body> | 7 </body> |
| 8 <script src="../editing.js"></script> | 8 <script src="../editing.js"></script> |
| 9 <script> | 9 <script> |
| 10 function editingTest() | 10 function editingTest() |
| 11 { | 11 { |
| 12 var target = document.getElementById("test"); | 12 var target = document.getElementById("test"); |
| 13 var selection = window.getSelection(); | 13 var selection = window.getSelection(); |
| 14 selection.collapse(target, target.childNodes.length); | 14 selection.collapse(target, target.childNodes.length); |
| 15 document.execCommand("insertHTML", false, "<span style='font-size: 16px' cla
ss='Apple-style-span'>This font is size 16px.</span>"); | 15 document.execCommand("insertHTML", false, "<span style='font-size: 16px'>Thi
s font is size 16px.</span>"); |
| 16 | 16 |
| 17 var results = document.getElementById("results"); | 17 var results = document.getElementById("results"); |
| 18 | 18 |
| 19 results.innerText = target.innerHTML; | 19 results.innerText = target.innerHTML; |
| 20 | 20 |
| 21 results.innerHTML += "<br>document.compatMode: " + document.compatMode; | 21 results.innerHTML += "<br>document.compatMode: " + document.compatMode; |
| 22 if (target.innerHTML.indexOf("font-size: 16px") == -1) { | 22 if (target.innerHTML.indexOf("font-size: 16px") == -1) { |
| 23 results.innerHTML += "<br>FAIL"; | 23 results.innerHTML += "<br>FAIL"; |
| 24 } else | 24 } else |
| 25 results.innerHTML += "<br>PASS"; | 25 results.innerHTML += "<br>PASS"; |
| 26 } | 26 } |
| 27 | 27 |
| 28 runDumpAsTextEditingTest(false); | 28 runDumpAsTextEditingTest(false); |
| 29 </script> | 29 </script> |
| OLD | NEW |