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

Side by Side Diff: LayoutTests/fast/domurl/url-host.html

Issue 331313011: Switch URL and URLUtils interfaces over to use ScalarValueString. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tidy new url-constructor test Created 6 years, 6 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
« no previous file with comments | « LayoutTests/fast/domurl/url-hash.html ('k') | LayoutTests/fast/domurl/url-pathname.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <link rel="help" href="http://url.spec.whatwg.org/#dom-url-host"> 2 <link rel="help" href="http://url.spec.whatwg.org/#dom-url-host">
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 6
7 test(function() { 7 test(function() {
8 var url = new URL('https://www.mydomain.com:8080/path/'); 8 var url = new URL('https://www.mydomain.com:8080/path/');
9 assert_equals(url.host, 'www.mydomain.com:8080'); 9 assert_equals(url.host, 'www.mydomain.com:8080');
10 url.host = 'www.otherdomain.com:0'; 10 url.host = 'www.otherdomain.com:0';
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 test(function() { 101 test(function() {
102 var url = new URL('http://abc.de/path/file?query#fragment'); 102 var url = new URL('http://abc.de/path/file?query#fragment');
103 url.href = 'invalid'; 103 url.href = 'invalid';
104 assert_equals(url.host, ''); 104 assert_equals(url.host, '');
105 url.host = 'changed'; 105 url.host = 'changed';
106 assert_equals(url.host, ''); 106 assert_equals(url.host, '');
107 assert_equals(url.href, 'invalid'); 107 assert_equals(url.href, 'invalid');
108 }, 'host property invalid URL'); 108 }, 'host property invalid URL');
109 109
110 test(function() {
111 var url = new URL('http://www.domain.com/');
112 assert_equals(url.host, 'www.domain.com');
113
114 url.host = 'www.bo\udc01\ud802gus.org';
115 assert_equals(url.host, '');
116 }, 'hostname with unmatched surrogates');
117
110 </script> 118 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/domurl/url-hash.html ('k') | LayoutTests/fast/domurl/url-pathname.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698