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