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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js

Issue 2586063002: DevTools: Show redirects from navigator.sendBeacon() (Closed)
Patch Set: Protocol test added Created 4 years 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/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js
index aafade0747146bac91277505c70c5315b7585680..64501da14d124b669178acfb9e8987cba0c84c8f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js
@@ -31,6 +31,20 @@ InspectorTest.evaluateInInspectedPage = function(expression, callback)
InspectorTest.sendCommand("Runtime.evaluate", { expression: expression }, callback);
}
+InspectorTest.parseURL = function(url)
+{
+ var result = {};
+ var match = url.match(/^([^:]+):\/\/([^\/:]*)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i);
+ if (!match)
+ return result;
+ result.scheme = match[1].toLowerCase();
+ result.host = match[2];
+ result.port = match[3];
+ result.path = match[4] || "/";
+ result.fragment = match[5];
+ return result;
+}
tyoshino (SeeGerritForStatus) 2017/01/10 05:21:39 can't we use the URL API for this? not available i
allada 2017/01/10 07:14:16 Sadly no, to keep protocol tests fast we load very
tyoshino (SeeGerritForStatus) 2017/01/10 10:36:29 Acknowledged.
+
}
var outputElement;

Powered by Google App Engine
This is Rietveld 408576698