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

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

Issue 1905553002: Expose toString() as enumerable on some objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sof-tidy-idl-pars
Patch Set: rebased Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/js/toString-dontEnum.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0128c0c561a14ee99ec47b0e3d5f4731667683cb..4660229473dbcf1e613768c046478b6442004b62 100644
--- a/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
+++ b/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
@@ -53,4 +53,31 @@ test(function() {
function() { new URL('//abc', null); },
'TypeError: Failed to construct \'URL\': Invalid base URL');
}, 'Invalid URL parameters');
+
+test(function() {
+ function assert_enumerable(p) {
+ assert_true(p in URL.prototype);
+ assert_true(URL.prototype.propertyIsEnumerable(p));
+ }
+
+ assert_true('URL' in self);
+
+ // TODO: uncomment when implemented.
+ // assert_true('domainToASCII' in URL);
+ // assert_true('domainToUnicode' in URL);
+
+ // Arguably better failure stacks to spell them out this way..
+ assert_enumerable('toString');
+ assert_enumerable('origin');
+ assert_enumerable('protocol');
+ assert_enumerable('username');
+ assert_enumerable('password');
+ assert_enumerable('host');
+ assert_enumerable('hostname');
+ assert_enumerable('port');
+ assert_enumerable('pathname');
+ assert_enumerable('search');
+ assert_enumerable('searchParams');
+ assert_enumerable('hash');
+}, 'URL interface');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/js/toString-dontEnum.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698