4 <script src=
"../editing.js"></script>
5 <script src=
"../../resources/dump-as-markup.js"></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.");
13 var test
= document
.getElementById("test");
14 execSetSelectionCommand(test
, 0, test
.nextSibling
, 0);
17 document
.getElementById("textarea-result").value
= "";
18 document
.getElementById("textarea-result").focus();
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();
34 internals
.settings
.setSelectionIncludesAltImageText(false);
37 internals
.settings
.setSelectionIncludesAltImageText(true);
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>