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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js

Issue 1373773003: Implement 'window.isSecureContext'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaseline. Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 function get_host_info() { 1 function get_host_info() {
2 var ORIGINAL_HOST = '127.0.0.1'; 2 var ORIGINAL_HOST = '127.0.0.1';
3 var REMOTE_HOST = 'localhost'; 3 var REMOTE_HOST = 'localhost';
4 var UNAUTHENTICATED_HOST = 'example.test'; 4 var UNAUTHENTICATED_HOST = 'example.test';
5 var HTTP_PORT = 8000; 5 var HTTP_PORT = 8000;
6 var HTTPS_PORT = 8443; 6 var HTTPS_PORT = 8443;
7 try { 7 try {
8 // In W3C test, we can get the hostname and port number in config.json 8 // In W3C test, we can get the hostname and port number in config.json
9 // using wptserve's built-in pipe. 9 // using wptserve's built-in pipe.
10 // http://wptserve.readthedocs.org/en/latest/pipes.html#built-in-pipes 10 // http://wptserve.readthedocs.org/en/latest/pipes.html#built-in-pipes
11 HTTP_PORT = eval('{{ports[http][0]}}'); 11 HTTP_PORT = eval('{{ports[http][0]}}');
12 HTTPS_PORT = eval('{{ports[https][0]}}'); 12 HTTPS_PORT = eval('{{ports[https][0]}}');
13 ORIGINAL_HOST = eval('\'{{host}}\''); 13 ORIGINAL_HOST = eval('\'{{host}}\'');
14 REMOTE_HOST = 'www1.' + ORIGINAL_HOST; 14 REMOTE_HOST = 'www1.' + ORIGINAL_HOST;
15 } catch (e) { 15 } catch (e) {
16 } 16 }
17 return { 17 return {
18 HTTP_ORIGIN: 'http://' + ORIGINAL_HOST + ':' + HTTP_PORT, 18 HTTP_ORIGIN: 'http://' + ORIGINAL_HOST + ':' + HTTP_PORT,
19 HTTPS_ORIGIN: 'https://' + ORIGINAL_HOST + ':' + HTTPS_PORT, 19 HTTPS_ORIGIN: 'https://' + ORIGINAL_HOST + ':' + HTTPS_PORT,
20 HTTP_REMOTE_ORIGIN: 'http://' + REMOTE_HOST + ':' + HTTP_PORT, 20 HTTP_REMOTE_ORIGIN: 'http://' + REMOTE_HOST + ':' + HTTP_PORT,
21 HTTPS_REMOTE_ORIGIN: 'https://' + REMOTE_HOST + ':' + HTTPS_PORT, 21 HTTPS_REMOTE_ORIGIN: 'https://' + REMOTE_HOST + ':' + HTTPS_PORT,
22 UNAUTHENTICATED_ORIGIN: 'http://' + UNAUTHENTICATED_HOST + ':' + HTTP_PORT 22 UNAUTHENTICATED_ORIGIN: 'http://' + UNAUTHENTICATED_HOST + ':' + HTTP_PORT,
23 AUTHENTICATED_ORIGIN: 'https://' + UNAUTHENTICATED_HOST + ':' + HTTPS_PORT
philipj_slow 2015/09/28 12:17:56 This now looks a bit weird, is there a better name
Mike West 2015/09/28 13:28:02 I don't know why we're using `example.test`, hones
23 }; 24 };
24 } 25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698