Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / copy-image-with-alt-text.html
blob4bbdfd79507880120b4dbef3959b2fa204e61392
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../editing.js"></script>
5 <script src="../../resources/dump-as-markup.js"></script>
6 <script>
7 Markup.description("This tests that image alt text makes it to the clipboard. This test requires DRT or WTR."
8 + " The first two dumps should not include alt text and the third and forth dumps should include alt text.");
9 Markup.noAutoDump();
11 function runTest()
13 var test = document.getElementById("test");
14 execSetSelectionCommand(test, 0, test.nextSibling, 0);
15 execCopyCommand();
17 document.getElementById("textarea-result").value = "";
18 document.getElementById("textarea-result").focus();
19 execPasteCommand();
20 Markup.dump("textarea-result");
22 document.getElementById("content-editable-result").innerHTML = "";
23 selection.collapse(document.getElementById("content-editable-result"), 0);
24 execPasteAndMatchStyleCommand();
25 Markup.dump("content-editable-result");
28 window.onload = function()
30 if (window.testRunner)
31 testRunner.dumpAsText();
33 if (window.internals)
34 internals.settings.setSelectionIncludesAltImageText(false);
35 runTest();
36 if (window.internals)
37 internals.settings.setSelectionIncludesAltImageText(true);
38 runTest();
40 Markup.notifyDone();
42 </script>
43 </head>
44 <body>
46 <div id="test">Here is an emoticon [<img src="resources/apple.gif" alt=":)">],
47 some more text [<img alt="sample text">],
48 an empty alt tag [<img alt="">],
49 no alt tag [<img src="resources/apple.gif">]
50 and two consecutive images [<img src="resources/apple.gif" alt="first"><img src="resources/apple.gif" alt="second">].</div>
51 <textarea id="textarea-result" style="width: 100%; height: 5em;"></textarea>
52 <div id="content-editable-result" contentEditable="true"></div>
53 </body>
54 </html>