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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/common/get-host-info.sub.js

Issue 2376103007: Import wpt@09907a9c4bcee14986431d53e4381384c7c69107 (Closed)
Patch Set: update platform expectations Created 4 years, 3 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 | « no previous file | third_party/WebKit/LayoutTests/imported/wpt/custom-elements/CustomElementRegistry.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/imported/wpt/common/get-host-info.sub.js
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/common/get-host-info.sub.js b/third_party/WebKit/LayoutTests/imported/wpt/common/get-host-info.sub.js
index 8d3d61de12a71f414d3662313fb9c72b685ea64c..5e60c49767b41df41035fc46eed02909e698839b 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/common/get-host-info.sub.js
+++ b/third_party/WebKit/LayoutTests/imported/wpt/common/get-host-info.sub.js
@@ -23,3 +23,13 @@ function get_host_info() {
HTTPS_REMOTE_ORIGIN_WITH_CREDS: 'https://foo:bar@' + REMOTE_HOST + ':' + HTTPS_PORT,
};
}
+
+function get_port(loc) {
+ // When a default port is used, location.port returns the empty string.
+ // To compare with wptserve `ports` substitution we need a port...
+ // loc can be Location/<a>/<area>/URL, but assumes http/https only.
+ if (loc.port) {
+ return loc.port;
+ }
+ return loc.protocol === 'https:' ? '443' : '80';
+}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/imported/wpt/custom-elements/CustomElementRegistry.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698