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

Unified Diff: third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html

Issue 1409293007: new URL('') should throw TypeError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated testcase Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
diff --git a/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html b/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
index 3291ef6b588cba83940b5f4c1f40f7b11e694563..c379f3821985a1eb24e81b32fffbacece17ef815 100644
--- a/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
+++ b/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
@@ -32,6 +32,12 @@ test(function() {
new URL();
}, 'TypeError: Failed to construct \'URL\': 1 argument required, but only 0 present.');
assertThrows(function() {
+ new URL('');
+ }, 'TypeError: Failed to construct \'URL\': Invalid URL');
+ assertThrows(function() {
+ new URL('','about:blank');
+ }, 'TypeError: Failed to construct \'URL\': Invalid URL');
+ assertThrows(function() {
new URL('abc');
}, 'TypeError: Failed to construct \'URL\': Invalid URL');
assertThrows(function() {

Powered by Google App Engine
This is Rietveld 408576698