Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: LayoutTests/inspector/timeline/tracing/update-layer-tree.html

Issue 477153005: DevTools: adopt existing Timeline tests for tracing based Timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <style>
4 .layer {
5 position: absolute;
6 width: 20px;
7 height: 20px;
8 -webkit-transform: translateZ(10px);
9 }
10 </style>
11 <script src="../../../http/tests/inspector/inspector-test.js"></script>
12 <script src="../../../http/tests/inspector/timeline-test.js"></script>
13 <script src="../../tracing-test.js"></script>
14 <script>
15
16 function doActions(callback)
17 {
18 var layer = document.createElement("div");
19 layer.classList.add("layer");
20 document.getElementById("parent-layer").appendChild(layer);
21
22 requestAnimationFrame(callback);
23 }
24
25 function test()
26 {
27 InspectorTest.invokeWithTracing("doActions", onTracingComplete);
28 function onTracingComplete()
29 {
30 var events = InspectorTest.tracingTimelineModel.inspectedTargetEvents();
31 for (var i = 0; i < events.length; ++i) {
32 var event = events[i];
33 if (events[i].name === WebInspector.TracingTimelineModel.RecordType. UpdateLayerTree) {
34 InspectorTest.addResult("Got UpdateLayerTree event");
35 break;
36 }
37 }
38 InspectorTest.addResult("Done");
39 InspectorTest.completeTest();
40 }
41 }
42
43 </script>
44 </head>
45
46 <body onload="runTest()">
47 <p>
48 Tests the instrumentation of UpdateLayerTree event
49 </p>
50 <div id="parent-layer"></div>
51 </body>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698