| Index: third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..75c8729cf716981ca79ebf15f01c431e5e156582
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html
|
| @@ -0,0 +1,38 @@
|
| +<!DOCTYPE html>
|
| +<meta charset="utf-8">
|
| +<title>[Browsing Context] : [APIs for creating browsing_contexts by name]</title>
|
| +<link rel="author" title="Duhyeong Kim" href="mailto:dduskim@gmail.com">
|
| +<link rel="help" href="https://html.spec.whatwg.org/multipage/#apis-for-creating-and-navigating-browsing-contexts-by-name">
|
| +<meta name=timeout content=long>
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script>
|
| +async_test(function() {
|
| + var currentUrl = 'http://' + window.location.host + '/common/blank.html';
|
| + var win = window.open(currentUrl, '', 'height=1,width=1');
|
| + this.add_cleanup(function() { win.close(); });
|
| + win.onload = this.step_func_done(function () {
|
| + assert_equals(win.location.href, currentUrl, 'should be equal to result url');
|
| + });
|
| +}, 'first argument: absolute url');
|
| +
|
| +test(function() {
|
| + var win = window.open('', '', 'height=1,width=1');
|
| + this.add_cleanup(function() { win.close(); });
|
| + assert_equals(win.location.href, 'about:blank', 'win.location.href');
|
| +}, 'first argument: empty url');
|
| +
|
| +test(function () {
|
| + var win = window.open('', 'testWindow', 'height=1,width=1');
|
| + win.close();
|
| + assert_equals(win.name, 'testWindow', 'should have a browsing context name');
|
| +}, 'second argument: passing a non-empty name');
|
| +
|
| +test(function () {
|
| + var win = window.open('', '', 'height=1,width=1');
|
| + this.add_cleanup(function() { win.close(); });
|
| + assert_equals(win.name, '', 'window should not have a name');
|
| + win.name = 'testWindow';
|
| + assert_equals(win.name, 'testWindow', 'window should have a name');
|
| +}, 'second argument: setting name after opening');
|
| +</script>
|
|
|