OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../http/tests/inspector/timeline-test.js"></script> | 4 <script src="../../http/tests/inspector/timeline-test.js"></script> |
5 <style> | 5 <style> |
6 .relayout-boundary { | 6 .relayout-boundary { |
7 overflow: hidden; | 7 overflow: hidden; |
8 width: 100px; | 8 width: 100px; |
9 height: 100px; | 9 height: 100px; |
10 } | 10 } |
11 </style> | 11 </style> |
12 <script> | 12 <script> |
13 | 13 if (window.internals) |
14 function prepare() | |
15 { | |
16 window.internals.settings.setTextAutosizingEnabled(true); | 14 window.internals.settings.setTextAutosizingEnabled(true); |
17 } | |
18 | 15 |
19 function performActions() | 16 function performActions() |
20 { | 17 { |
21 invalidateAndForceLayout(document.getElementById("invalidate1")); | 18 invalidateAndForceLayout(document.getElementById("invalidate1")); |
22 invalidateAndForceLayout(document.getElementById("invalidate2")); | 19 invalidateAndForceLayout(document.getElementById("invalidate2")); |
23 } | 20 } |
24 | 21 |
25 function invalidateAndForceLayout(element) | 22 function invalidateAndForceLayout(element) |
26 { | 23 { |
27 element.style.marginTop = "10px"; | 24 element.style.marginTop = "10px"; |
28 var unused = element.offsetHeight; | 25 var unused = element.offsetHeight; |
29 } | 26 } |
30 | 27 |
31 function test() | 28 function test() |
32 { | 29 { |
33 InspectorTest.evaluateInPage("prepare()", function() { | 30 InspectorTest.performActionsAndPrint("performActions()", "AutosizeText"); |
34 InspectorTest.performActionsAndPrint("performActions()", "AutosizeText")
; | |
35 }); | |
36 } | 31 } |
37 | 32 |
38 </script> | 33 </script> |
39 </head> | 34 </head> |
40 | 35 |
41 <body onload="runTest()"> | 36 <body onload="runTestAfterDisplay()"> |
42 <p> | 37 <p> |
43 Tests the Timeline API instrumentation of a Layout event with Text Autosizing en
abled. | 38 Tests the Timeline API instrumentation of a Layout event with Text Autosizing en
abled. |
44 </p> | 39 </p> |
45 <div class="relayout-boundary"> | 40 <div class="relayout-boundary"> |
46 <div>text</div> | 41 <div>text</div> |
47 <div></div> | 42 <div></div> |
48 <div> | 43 <div> |
49 <div id="invalidate1"><div>text</div></div> | 44 <div id="invalidate1"><div>text</div></div> |
50 </div> | 45 </div> |
51 </div> | 46 </div> |
52 <div class="relayout-boundary"> | 47 <div class="relayout-boundary"> |
53 <div></div> | 48 <div></div> |
54 <div>text</div> | 49 <div>text</div> |
55 <div id="invalidate2"><div>text</div></div> | 50 <div id="invalidate2"><div>text</div></div> |
56 <div></div> | 51 <div></div> |
57 <div></div> | 52 <div></div> |
58 <div>text</div> | 53 <div>text</div> |
59 </div> | 54 </div> |
60 | 55 |
61 </body> | 56 </body> |
62 </html> | 57 </html> |
OLD | NEW |