- add third_party src.
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / text-autosizing / oscillation-javascript-fontsize-change.html
1 <!DOCTYPE html>
2 <html style="font-size: 16px">
3 <head>
4
5 <meta name="viewport" content="width=800">
6 <style>
7   body {
8     width: 800px;
9     margin: 0;
10     overflow-y: hidden;
11   }
12   .largersize{font-size: 1.1em}
13 </style>
14
15 <script>
16 if (window.internals) {
17     window.internals.settings.setTextAutosizingEnabled(true);
18     window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
19 } else if (window.console && console.warn) {
20     console.warn("This test depends on the Text Autosizing setting being true, so run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP.");
21 }
22 </script>
23
24 </head>
25 <body>
26
27 <div style="top: 50px; position: absolute; overflow: auto;">
28     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br/>
29     This paragraph should be autosized to 19.8px<br/>
30     because it contains line breaks.<br/>
31     This test is intended to check<br/>
32     that there are no oscillations due to javascript<br/>
33     briefly increasing the font size of a<br/>
34     small paragraph below.
35 </div>
36 <div id="sizechanging">
37     This text changes size using javascript below.
38 </div>
39
40 <script>
41 element = document.getElementById("sizechanging");
42 if (element.offsetHeight) {
43     // force layout (computation of offsetHeight triggers reflow)
44 }
45 element.className = 'largersize';
46 if (element.offsetHeight) {}
47 element.className = '';
48 if (element.offsetHeight) {}
49 </script>
50 <noscript>fail (no support for javascript)</noscript>
51
52 </body>
53 </html>