Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / style / apply-through-end-of-document.html
1 <html>
2 <head>
3     <script>
4         function test()
5         {
6             if (window.testRunner)
7                 testRunner.dumpAsText();
8
9             var edit = document.getElementById("edit");
10             while (edit.nextSibling)
11                 edit.nextSibling.parentNode.removeChild(edit.nextSibling);
12
13             var source = document.getElementById("source");
14             var selection = getSelection();
15
16             selection.collapse(source.firstChild, 5);
17             selection.modify("extend", "forward", "word");
18
19             document.execCommand("Copy");
20             edit.focus();
21             document.execCommand("SelectAll");
22             document.execCommand("Paste");
23         }
24     </script>
25 </head>
26 <body onload="test()">
27 <p>
28     Test for <i><a href="rdar://problem/6864786">rdar://problem/6864786</a>: REGRESSION: Crash below ApplyStyleCommand::applyInlineStyleToRange when reviewing a patch in Bugzilla</i>.
29 </p>
30 <p>
31     The test passes if it does not crash.
32 </p>
33 <div id="source" style="font-size: 36px">Copy the second word in this sentence.</div>
34 <pre id="edit" style="-webkit-user-modify: read-write-plaintext-only;">Select All here and paste<br></pre>
35 </body>
36 </html>