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

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

Powered by Google App Engine
This is Rietveld 408576698