| 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)
|
|
|