Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing / timeline-receive-response-event.html
blobe824b27e03bebda21abf30891ae462f313d1ca37
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 var image = new Image();
10 image.onload = bar;
11 image.src = "resources/anImage.png";
13 function bar()
15 var image = new Image();
16 image.onload = function(event) { callback(); } // do not pass event argument to the callback.
17 image.src = "resources/anotherImage.png";
21 function test()
23 WebInspector.TimelinePanel.show();
24 WebInspector.panels.timeline._model._currentTarget = WebInspector.targetManager.mainTarget();
25 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
27 function finish()
29 function dumpFormattedRecord(presentationRecord, prefix)
31 var record = presentationRecord.record();
32 prefix = prefix || "";
33 // Ignore stray paint & rendering events for better stability.
34 var categoryName = WebInspector.TimelineUIUtils.categoryForRecord(record).name;
35 if (categoryName !== "loading" && categoryName !== "scripting")
36 return;
37 var childPrefix = prefix;
38 // Here and below: pretend coalesced record are just not there, as coalescation is time dependent and, hence, not stable.
39 // Filter out InjectedScript function call because they happen out of sync.
40 if (!presentationRecord.coalesced()
41 && record.type() !== "GCEvent"
42 && (record.type() !== "FunctionCall" || record.traceEvent().args["data"].scriptName)) {
43 InspectorTest.addResult(prefix + record.type());
44 childPrefix = childPrefix + " ";
46 if (presentationRecord.presentationChildren()) {
47 for (var i = 0; i < presentationRecord.presentationChildren().length; ++i)
48 dumpFormattedRecord(presentationRecord.presentationChildren()[i], childPrefix);
51 var records = InspectorTest.timelinePresentationModel().rootRecord().presentationChildren();
52 for (var i = 0; i < records.length; ++i)
53 dumpFormattedRecord(records[i]);
54 InspectorTest.completeTest();
58 if (!window.testRunner)
59 setTimeout(performActions, 3000);
61 </script>
62 </head>
64 <body onload="runTest()">
65 <p>
66 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc.
67 </p>
69 </body>
70 </html>