Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / plaintext-mode-2.html
blob232128c1b2d4e8973effe69fc0b820fc0c73cfbe
1 <script>
2 function log(message) {
3 var li = document.createElement("li");
4 li.appendChild(document.createTextNode(message));
5 var console = document.getElementById("console");
6 console.appendChild(li);
9 function assert(func, args, expected) {
10 var f = func + '("' + args + '")';
11 var result = eval(f);
12 if (result != expected)
13 log('Failure: ' + f + ' was ' + result + ', expected: ' + expected);
14 else
15 log('Success: ' + f + ' == ' + result);
17 </script>
19 <input id="textfield" type="text" style="width: 600">
20 <br>
21 <div id="richcontent">This <b>styled <i>text</i></b>, and <a href="http://www.google.com"> link</a> will be pasted into the textfield. All richness should be stripped.</div>
22 <ol id="console"></ol>
23 <script>
24 if (window.testRunner)
25 window.testRunner.waitUntilDone();
27 var richcontent = document.getElementById("richcontent");
28 var s = window.getSelection();
29 s.setBaseAndExtent(richcontent, 0, richcontent, richcontent.childNodes.length);
30 assert("document.execCommand", "Copy", true);
32 var e = document.getElementById("textfield");
33 e.focus();
34 e.setSelectionRange(0, 0);
36 window.setTimeout(paste, 500);
37 function paste() {
38 assert("document.execCommand", "Paste", true);
39 if (window.testRunner)
40 window.testRunner.notifyDone();
42 </script>