| <head> |
| <script> |
| function runTest() |
| { |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| var paragraph = document.getElementById("paragraph"); |
| var textNode = paragraph.firstChild; |
| var range = document.createRange(); |
| range.setStart(textNode, 24) |
| range.setEnd(textNode, 28) |
| getSelection().addRange(range); |
| paragraph.setAttribute("style", "display: none"); |
| document.execCommand("Copy"); |
| document.getElementById("message").firstChild.data = "PASSED"; |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <p>This tests to make sure a copy after making the selection display: none does not hit an assertion.</p> |
| <p id="message">TEST NOT COMPLETE</p> |
| <div>This is text before the test paragraph. <p id="paragraph">This paragraph will be hidden and then copied.</p></div><p>This is the paragraph after the hidden one.</p> |
| </body> |