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

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

Issue 105823005: Remove TreatNullAs=NullString for URLUtils.href (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: force rebuild Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <link rel="help" href="http://url.spec.whatwg.org/#dom-url-href"> 2 <link rel="help" href="http://url.spec.whatwg.org/#dom-url-href">
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.href, 'http://www.domain.com/'); 9 assert_equals(url.href, 'http://www.domain.com/');
10 assert_equals(url.href, url.toString()); 10 assert_equals(url.href, url.toString());
11 11
12 url.href = 'mailto:foo@bar.com'; 12 url.href = 'mailto:foo@bar.com';
13 assert_equals(url.href, 'mailto:foo@bar.com'); 13 assert_equals(url.href, 'mailto:foo@bar.com');
14 14
15 }, 'href property'); 15 }, 'href property');
16 16
17 test(function() { 17 test(function() {
18 var url = new URL('http://abc.de/path/file?query#fragment'); 18 var url = new URL('http://abc.de/path/file?query#fragment');
19 url.href = 'invalid'; 19 url.href = 'invalid';
20 assert_equals(url.href, 'invalid'); 20 assert_equals(url.href, 'invalid');
21 }, 'setting href to an invalid URL'); 21 }, 'setting href to an invalid URL');
22 22
23 test(function() {
24 var url = new URL('http://domain.com/');
25 url.href = null;
26 assert_equals(url.href, 'null');
27 }, 'setting href to null');
28
23 </script> 29 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/element-attribute-js-null-expected.txt ('k') | LayoutTests/fast/domurl/url-href-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698