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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/window-open.html

Issue 2755773002: Make Window#open arguments optional to match the spec
Patch Set: Updated layout tests for window.open Created 3 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/function-length.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/window-open.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/window-open.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/window-open.html
new file mode 100644
index 0000000000000000000000000000000000000000..68ef4490ecc2819622270205a5a669bb590dbbb3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/window-open.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>Window#open</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+test(function() {
+ assert_equals(window.open().location.href, 'about:blank');
+ assert_equals(window.open(undefined).location.href, 'about:blank');
+ assert_equals(window.open('null').location.href, 'about:blank');
foolip 2017/04/05 04:33:56 Here I meant to test using the literal null, not a
+}, 'window.open() should have default url = "about:blank"');
+
+test(function() {
+ assert_equals(window.open('about:blank', undefined).name, '');
+ assert_equals(window.open('about:blank', null).name, '');
+}, 'window.open() browsing context name');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/js/function-length.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698