Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / copy-resolves-urls.html
blobb59585b8f84c8f4a32178a9b2469cccb78a35fdf
1 <p>This tests to make sure that copying/pasting HTML results in URLs being full paths so
2 pasting between websites works. To test manually, copy the selection and paste it into
3 the blue box. If this is a file:/// url, the links should be relative. If this is an
4 http:// url, the links should be absolute.</p>
5 <div id="test">
6 <a href="../relative/path/foo.html">link</a><img src="resources/abe.png">
7 </div>
8 <div id="pastehere" contenteditable="true" style="border: 1px solid blue" onpaste="paste()">
9 </div>
10 <div id="results"></div>
11 <script>
12 function test()
14 var s = window.getSelection();
15 var test = document.getElementById("test");
16 s.selectAllChildren(test);
18 if (!window.testRunner)
19 return;
20 testRunner.dumpAsText();
21 testRunner.waitUntilDone();
23 document.execCommand("Copy");
24 var pasteHere = document.getElementById("pastehere");
25 s.collapse(pasteHere, 0);
26 document.execCommand("Paste");
29 function paste()
31 setTimeout(afterPaste, 0);
34 function afterPaste()
36 var pasteHere = document.getElementById("pastehere");
37 var results = document.getElementById("results");
38 results.appendChild(document.createTextNode(pasteHere.innerHTML));
39 if (window.testRunner)
40 testRunner.notifyDone();
43 test();
44 </script>