Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing / timeline-network-received-data.html
bloba7372e67c1d606ab01f60c6ebecb41f394292175
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script>
7 function performActions(callback)
9 function onImageLoad()
11 window._imageLoaded = true;
12 if (window._scriptEvaluated)
13 callback();
16 function scriptEvaluated()
18 window._scriptEvaluated = true;
19 if (window._imageLoaded)
20 callback();
23 var image = new Image();
24 image.onload = onImageLoad;
25 image.src = "resources/anImage.png";
26 var script = document.createElement("script");
27 script.src = "timeline-network-resource.js";
28 document.body.appendChild(script);
30 window.timelineNetworkResourceEvaluated = scriptEvaluated;
33 function test()
35 InspectorTest.invokeAsyncWithTimeline("performActions", done);
37 function done()
39 InspectorTest.addResult("Script evaluated.");
40 var record = InspectorTest.findFirstTimelineRecord("ResourceReceivedData");
41 if (record) {
42 var data = record.traceEvent().args["data"];
43 if (data && typeof data.encodedDataLength === "number")
44 InspectorTest.addResult("Resource received data has length, test passed.");
46 InspectorTest.completeTest();
50 </script>
51 </head>
53 <body onload="runTest()">
54 <p>
55 Tests the Timeline API instrumentation of a network resource received data
56 </p>
57 </body>
58 </html>