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

Unified Diff: LayoutTests/inspector/timeline/timeline-network-resource.html

Issue 480013002: Do not use raw protocol types in inspector/timeline/timeline-network-resource.html (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/inspector/timeline-test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/timeline/timeline-network-resource.html
diff --git a/LayoutTests/inspector/timeline/timeline-network-resource.html b/LayoutTests/inspector/timeline/timeline-network-resource.html
index 4bb691b25f496b89473448edcb4bdac0aea357a8..63f3d6d184551e88aa62131ac3acfdbb071e3181 100644
--- a/LayoutTests/inspector/timeline/timeline-network-resource.html
+++ b/LayoutTests/inspector/timeline/timeline-network-resource.html
@@ -30,16 +30,20 @@ function test()
function format(record)
{
if (record.type() === WebInspector.TimelineModel.RecordType.ResourceSendRequest)
- printSend(record._record);
+ printSend(record);
else if (record.type() === WebInspector.TimelineModel.RecordType.ResourceReceiveResponse)
- printReceive(record._record);
+ printReceive(record);
else if (record.type() === WebInspector.TimelineModel.RecordType.ResourceFinish)
- printFinish(record._record);
+ printFinish(record);
- if (record.parent && record.parent.type() === WebInspector.TimelineModel.RecordType.Root) {
- if (lastRecordStartTime)
- InspectorTest.assertGreaterOrEqual(record.startTime(), lastRecordStartTime, "Top level records order violation");
- lastRecordStartTime = record.startTime();
+ var presentationRecord = presentationModel.toPresentationRecord(record);
+ if (presentationRecord && record.thread() === WebInspector.TimelineModel.MainThreadName) {
+ var parentIsRoot = presentationRecord.presentationParent() && !presentationRecord.presentationParent().presentationParent();
+ if (parentIsRoot) {
+ if (lastRecordStartTime)
+ InspectorTest.assertGreaterOrEqual(record.startTime(), lastRecordStartTime, "Top level records order violation");
+ lastRecordStartTime = record.startTime();
+ }
}
}
model.forAllRecords(format);
@@ -55,28 +59,28 @@ function test()
function printSend(record)
{
printRecord(record);
- requestId = record.data.requestId;
- if (record.data.url === undefined)
+ requestId = record.data().requestId;
+ if (record.data().url === undefined)
InspectorTest.addResult("* No 'url' property in record");
- else if (record.data.url.indexOf(scriptUrl) === -1)
+ else if (record.data().url.indexOf(scriptUrl) === -1)
InspectorTest.addResult("* Didn't find URL: " + scriptUrl);
}
function printReceive(record)
{
printRecord(record);
- if (requestId !== record.data.requestId)
+ if (requestId !== record.data().requestId)
InspectorTest.addResult("Didn't find matching requestId: " + requestId);
- if (record.data.statusCode !== 0)
- InspectorTest.addResult("Response received status: " + record.data.statusCode);
+ if (record.data().statusCode !== 0)
+ InspectorTest.addResult("Response received status: " + record.data().statusCode);
}
function printFinish(record)
{
printRecord(record);
- if (requestId !== record.data.requestId)
+ if (requestId !== record.data().requestId)
InspectorTest.addResult("Didn't find matching requestId: " + requestId);
- if (record.data.didFail)
+ if (record.data().didFail)
InspectorTest.addResult("Request failed.");
}
}
« no previous file with comments | « LayoutTests/http/tests/inspector/timeline-test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698