1 <script src=
"../../resources/dump-as-markup.js"></script>
2 <div id=
"div" contenteditable=
"true"></div>
7 Markup
.description("This test execCommand('FontSize', ...). You should see 'small' 'medium' and 'large' below in every increasing font sizes.")
10 var li
= document
.createElement("li");
11 li
.appendChild(document
.createTextNode(str
));
12 var console
= document
.getElementById("console");
13 console
.appendChild(li
);
16 var div
= document
.getElementById("div");
17 var sel
= window
.getSelection();
20 Markup
.dump(div
, 'initial');
22 if (document
.execCommand("FontSize", false, "pasd"))
23 log("Failure: execCommand('FontSize', [Illegal value]) should fail.");
25 if (!document
.execCommand("FontSize", false, "2"))
26 log("Failure: execCommand('FontSize', [Legal value]) failed.");
27 Markup
.dump(div
, 'fontsize 2');
29 document
.execCommand("InsertText", false, "small");
30 Markup
.dump(div
, 'type small');
32 if (!document
.execCommand("FontSize", false, "4"))
33 log("Failure: execCommand('FontSize', [Legal value]) failed.");
34 Markup
.dump(div
, 'fontsize 4');
36 document
.execCommand("InsertText", false, "medium");
37 Markup
.dump(div
, 'type medium');
39 if (!document
.execCommand("FontSize", false, "6"))
40 log("Failure: execCommand('FontSize', [Legal value]) failed.");
41 Markup
.dump(div
, 'fontsize 6');
43 document
.execCommand("InsertText", false, "large");
44 Markup
.dump(div
, 'type large');
46 Markup
.dump('console', 'console');