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

Side by Side Diff: LayoutTests/fast/domurl/url-pathname.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-host.html ('k') | Source/core/dom/URL.idl » ('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-pathname"> 2 <link rel="help" href="http://url.spec.whatwg.org/#dom-url-pathname">
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('http://www.domain.com/'); 8 var url = new URL('http://www.domain.com/');
9 assert_equals(url.pathname, '/'); 9 assert_equals(url.pathname, '/');
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 test(function() { 44 test(function() {
45 var url = new URL('http://abc.de:8080/path/file?query#fragment'); 45 var url = new URL('http://abc.de:8080/path/file?query#fragment');
46 url.href = 'invalid'; 46 url.href = 'invalid';
47 assert_equals(url.pathname, ''); 47 assert_equals(url.pathname, '');
48 48
49 url.pathname = '/new/path'; 49 url.pathname = '/new/path';
50 assert_equals(url.pathname, ''); 50 assert_equals(url.pathname, '');
51 assert_equals(url.href, 'invalid'); 51 assert_equals(url.href, 'invalid');
52 }, 'pathname property invalid URL'); 52 }, 'pathname property invalid URL');
53 53
54 test(function() {
55 var url = new URL('http://www.domain.com/');
56 assert_equals(url.pathname, '/');
57
58 url.pathname = '\udc01\ud802a';
59 assert_equals(url.pathname, '/' + encodeURIComponent('\ufffd\ufffda'));
60 }, 'pathname with unmatched surrogates');
61
54 </script> 62 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/domurl/url-host.html ('k') | Source/core/dom/URL.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698