| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 .layer { | 4 .layer { |
| 5 position: absolute; | 5 position: absolute; |
| 6 width: 20px; | 6 width: 20px; |
| 7 height: 20px; | 7 height: 20px; |
| 8 transform: translateZ(10px); | 8 transform: translateZ(10px); |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| 11 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 11 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 12 <script src="../../../http/tests/inspector/timeline-test.js"></script> | 12 <script src="../../../http/tests/inspector/timeline-test.js"></script> |
| 13 <script> | 13 <script> |
| 14 | 14 |
| 15 function doActions(callback) | 15 function doActions() |
| 16 { | 16 { |
| 17 var layer = document.createElement("div"); | 17 var layer = document.createElement("div"); |
| 18 layer.classList.add("layer"); | 18 layer.classList.add("layer"); |
| 19 document.getElementById("parent-layer").appendChild(layer); | 19 document.getElementById("parent-layer").appendChild(layer); |
| 20 | 20 return new Promise((fulfill) => testRunner.layoutAndPaintAsyncThen(fulfill))
; |
| 21 if (window.testRunner) | |
| 22 testRunner.layoutAndPaintAsyncThen(callback); | |
| 23 } | 21 } |
| 24 | 22 |
| 25 function test() | 23 function test() |
| 26 { | 24 { |
| 27 InspectorTest.invokeWithTracing("doActions", onTracingComplete); | 25 InspectorTest.invokeWithTracing("doActions", onTracingComplete); |
| 28 function onTracingComplete() | 26 function onTracingComplete() |
| 29 { | 27 { |
| 30 var events = InspectorTest.timelineModel().inspectedTargetEvents(); | 28 var events = InspectorTest.timelineModel().inspectedTargetEvents(); |
| 31 for (var i = 0; i < events.length; ++i) { | 29 for (var i = 0; i < events.length; ++i) { |
| 32 var event = events[i]; | 30 var event = events[i]; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 43 </script> | 41 </script> |
| 44 </head> | 42 </head> |
| 45 | 43 |
| 46 <body onload="runTest()"> | 44 <body onload="runTest()"> |
| 47 <p> | 45 <p> |
| 48 Tests the instrumentation of UpdateLayerTree event | 46 Tests the instrumentation of UpdateLayerTree event |
| 49 </p> | 47 </p> |
| 50 <div id="parent-layer"></div> | 48 <div id="parent-layer"></div> |
| 51 </body> | 49 </body> |
| 52 </html> | 50 </html> |
| OLD | NEW |