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 | 5 |
6 <style> | 6 <style> |
7 .test-style { | 7 .test-style { |
8 color: red; | 8 color: red; |
9 } | 9 } |
10 </style> | 10 </style> |
11 | 11 |
12 <script> | 12 <script> |
13 | 13 |
14 function forceStyle() | 14 function performActions() |
15 { | 15 { |
16 var element = document.createElement("div"); | 16 var element = document.createElement("div"); |
17 element.className = "test-style"; | 17 element.className = "test-style"; |
18 element.innerHTML = "<span>Test data</span>"; | 18 element.innerHTML = "<span>Test data</span>"; |
19 document.querySelector('section > div').appendChild(element); | 19 document.querySelector('section > div').appendChild(element); |
20 var unused = element.offsetWidth; | 20 var unused = element.offsetWidth; |
21 } | 21 } |
22 | 22 |
23 function performActions() | |
24 { | |
25 wrapCallFunctionForTimeline(forceStyle); | |
26 } | |
27 | |
28 function test() | 23 function test() |
29 { | 24 { |
30 InspectorTest.performActionsAndPrint("performActions()", "UpdateLayoutTree")
; | 25 InspectorTest.performActionsAndPrint("performActions()", "UpdateLayoutTree")
; |
31 } | 26 } |
32 | 27 |
33 </script> | 28 </script> |
34 </head> | 29 </head> |
35 | 30 |
36 <body onload="runTest()"> | 31 <body onload="runTest()"> |
37 <p> | 32 <p> |
38 Tests the Timeline API instrumentation of a style recalculation event | 33 Tests the Timeline API instrumentation of a style recalculation event |
39 </p> | 34 </p> |
40 <section> | 35 <section> |
41 <div></div> | 36 <div></div> |
42 </section> | 37 </section> |
43 </body> | 38 </body> |
44 </html> | 39 </html> |
OLD | NEW |