[WK2] Small Caps font variant issue for Italic fonts
[framework/web/webkit-efl.git] / LayoutTests / editing / style / fontsize-1.html
1 <script src="../../resources/dump-as-markup.js"></script>
2 <div id="div" contenteditable="true"></div>
3 <ul id="console"></ul>
4
5 <script>
6
7 Markup.description("This test execCommand('FontSize', ...).  You should see 'small' 'medium' and 'large' below in every increasing font sizes.")
8
9 function log(str) {
10     var li = document.createElement("li");
11     li.appendChild(document.createTextNode(str));
12     var console = document.getElementById("console");
13     console.appendChild(li);
14 }
15
16 var div = document.getElementById("div");
17 var sel = window.getSelection();
18
19 sel.setPosition(div, 0);
20 Markup.dump(div, 'initial');
21
22 if (document.execCommand("FontSize", false, "pasd"))
23     log("Failure: execCommand('FontSize', [Illegal value]) should fail.");
24
25 if (!document.execCommand("FontSize", false, "2"))
26     log("Failure: execCommand('FontSize', [Legal value]) failed.");
27 Markup.dump(div, 'fontsize 2');
28
29 document.execCommand("InsertText", false, "small");    
30 Markup.dump(div, 'type small');
31
32 if (!document.execCommand("FontSize", false, "4"))
33     log("Failure: execCommand('FontSize', [Legal value]) failed.");
34 Markup.dump(div, 'fontsize 4');
35
36 document.execCommand("InsertText", false, "medium");
37 Markup.dump(div, 'type medium');
38
39 if (!document.execCommand("FontSize", false, "6"))
40     log("Failure: execCommand('FontSize', [Legal value]) failed.");
41 Markup.dump(div, 'fontsize 6');
42
43 document.execCommand("InsertText", false, "large");
44 Markup.dump(div, 'type large');
45
46 Markup.dump('console', 'console');
47
48 </script>