9 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
10 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/tracing-test.js"></script>
13 function performActions(callback
)
15 var div
= document
.querySelector("#myDiv");
16 div
.classList
.add("my-class");
23 InspectorTest
.invokeAsyncWithTracing("performActions", finish
);
25 function finish(devtoolsEvents
)
27 var schedRecalc
= InspectorTest
.findEvent("ScheduleStyleRecalculation", "I");
28 var recalcBegin
= InspectorTest
.findEvent("UpdateLayoutTree", "B");
29 var recalcEnd
= InspectorTest
.findEvent("UpdateLayoutTree", "E");
30 InspectorTest
.log("UpdateLayoutTree frames match: " + (schedRecalc
.args
.data
.frame
=== recalcBegin
.args
.beginData
.frame
));
31 InspectorTest
.log("UpdateLayoutTree elementCount > 0: " + (recalcEnd
.args
.elementCount
> 0));
33 var invalidate
= InspectorTest
.findEvent("InvalidateLayout", "I");
34 var layoutBegin
= InspectorTest
.findEvent("Layout", "B");
35 var layoutEnd
= InspectorTest
.findEvent("Layout", "E");
37 InspectorTest
.log("InvalidateLayout frames match: " + (recalcBegin
.args
.beginData
.frame
=== invalidate
.args
.data
.frame
));
39 var beginData
= layoutBegin
.args
.beginData
;
40 InspectorTest
.log("Layout frames match: " + (invalidate
.args
.data
.frame
=== beginData
.frame
));
41 InspectorTest
.log("dirtyObjects > 0: " + (beginData
.dirtyObjects
> 0));
42 InspectorTest
.log("totalObjects > 0: " + (beginData
.totalObjects
> 0));
44 var endData
= layoutEnd
.args
.endData
;
45 InspectorTest
.log("has rootNode id: " + (endData
.rootNode
> 0));
46 InspectorTest
.log("has root quad: " + !!endData
.root
);
48 InspectorTest
.log("SUCCESS: found all expected events.");
49 InspectorTest
.completeTest();
55 <body onLoad=
"runTest();">
56 <div id=
"myDiv">DIV
</div>