Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / style / relative-font-size-change-003.html
blob170ad3d0464e0ffbdbb20c66151e4ea9680a7197
1 <html>
2 <head>
4 <style>
5 .editing {
6 border: 2px solid red;
7 padding: 12px;
8 font-size: 24px;
10 .explanation {
11 border: 2px solid blue;
12 padding: 12px;
13 font-size: 24px;
14 margin-bottom: 24px;
16 </style>
17 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
19 <script>
20 if (window.internals)
21 internals.settings.setEditingBehavior('mac');
23 function editingTest() {
24 moveSelectionForwardByLineCommand();
25 for (i = 0; i < 5; i++)
26 extendSelectionForwardByWordCommand();
27 for (i = 0; i < 6; i++)
28 fontSizeDeltaCommand("+1px");
29 moveSelectionBackwardByCharacterCommand();
30 for (i = 0; i < 2; i++)
31 extendSelectionForwardByWordCommand();
32 for (i = 0; i < 6; i++)
33 fontSizeDeltaCommand("-1px");
36 </script>
38 <title>Editing Test</title>
39 </head>
40 <body contenteditable="true">
41 <div class="explanation">
42 Size check should say: 24px. The first two words of the second line should appear to be 24px. The rest of the
43 words on the second line should appear to be 30px.
44 </div>
46 <div style="font-size: 24px; margin-bottom: 16px;">Size check: <span id="check"></span></div>
48 <div id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
49 <div id="test" class="editing">There is a tide
50 <div id="sizeTest" class="editing">In the affairs of men
51 </div>
52 Which taken at the flood
53 </div>
54 </div>
56 <script>
57 runEditingTest();
58 test = document.getElementById("sizeTest").firstChild;
59 check = document.getElementById("check");
60 size = document.defaultView.getComputedStyle(test, "").getPropertyValue("font-size");
61 check.innerHTML = size;
62 </script>
64 </body>
65 </html>