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

Unified Diff: third_party/WebKit/Source/devtools/front_end/Tests.js

Issue 1828203005: Expose SPDY pushes in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a test Created 4 years, 8 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
Index: third_party/WebKit/Source/devtools/front_end/Tests.js
diff --git a/third_party/WebKit/Source/devtools/front_end/Tests.js b/third_party/WebKit/Source/devtools/front_end/Tests.js
index af9d033d9a1dc8ff5e4959ed24f392cd812f17fc..31813795b738bebd2caf10ae249873d92177084a 100644
--- a/third_party/WebKit/Source/devtools/front_end/Tests.js
+++ b/third_party/WebKit/Source/devtools/front_end/Tests.js
@@ -526,6 +526,29 @@ TestSuite.prototype.testNetworkTiming = function()
};
+TestSuite.prototype.testPushTimes = function(url)
+{
+ var test = this;
+
+ function finishResource(resource, finishTime)
+ {
+ test.assertTrue(typeof resource.timing.pushStart === "number" && resource.timing.pushStart > 0, "pushStart is invalid: " + resource.timing.pushStart);
+ test.assertTrue(typeof resource.timing.pushEnd === "number" && resource.timing.pushEnd > 0, "pushEnd is invalid: " + resource.timing.pushEnd);
+ test.assertTrue(resource.timing.pushStart < resource.timing.pushEnd, `pushStart should be before pushEnd (${resource.timing.pushStart} >= ${resource.timing.pushEnd})`);
+ test.assertTrue(resource.timing.pushStart < resource.startTime, "pushStart should be before startTime");
+ test.assertTrue(resource.startTime < resource.timing.pushEnd, "pushEnd should be after startTime");
+ test.assertTrue(resource.timing.pushEnd < resource.endTime, "pushEnd should be before endTime");
+
+ test.releaseControl();
+ }
+
+ this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
+
+ test.evaluateInConsole_("addImage('" + url + "')", function(resultText) {});
+ this.takeControl();
+};
+
+
TestSuite.prototype.testConsoleOnNavigateBack = function()
{
if (WebInspector.multitargetConsoleModel.messages().length === 1)

Powered by Google App Engine
This is Rietveld 408576698