Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-04-05 13:36:47 UTC (rev 214944)
@@ -1,3 +1,47 @@
+2017-04-05 Chris Dumez <[email protected]>
+
+ _blank / _self / _parent / _top browsing context names should be case-insensitive
+ https://bugs.webkit.org/show_bug.cgi?id=169747
+
+ Reviewed by Alex Christensen.
+
+ Import test coverage from upstream web-platform-tests.
+
+ * resources/import-expectations.json:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/001.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/002.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/existing.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html: Added.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log.
+ * web-platform-tests/html/browsers/windows/browsing-context-names/self1.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/self2.html:
+ * web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log:
+
2017-03-31 Manuel Rego Casasnovas <[email protected]>
[css-grid] Update W3C Test Suite
Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2017-04-05 13:36:47 UTC (rev 214944)
@@ -199,6 +199,7 @@
"web-platform-tests/html/browsers/sandboxing": "skip",
"web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/": "import",
"web-platform-tests/html/browsers/windows/browsing-context-first-created.xhtml": "skip",
+ "web-platform-tests/html/browsers/windows/browsing-context-names": "import",
"web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.html": "skip",
"web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.html": "skip",
"web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html": "skip",
@@ -323,4 +324,4 @@
"web-platform-tests/webvr": "skip",
"web-platform-tests/webvtt": "skip",
"web-platform-tests/workers": "skip"
-}
+}
\ No newline at end of file
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -1,7 +1,7 @@
<!doctype html>
<title>Link with target=_blank, rel=noreferrer</title>
-<script src=""
-<script src=""
+<script src=""
+<script src=""
<div id="log"></div>
<a href="" rel="noreferrer" target="_blank">Link</a>
<script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -1,7 +1,7 @@
<!doctype html>
<title>Link with target=_blank, no rel</title>
-<script src=""
-<script src=""
+<script src=""
+<script src=""
<div id="log"></div>
<a href="" target="_blank">Link</a>
<script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,4 @@
+
+PASS window.open into `_blank` should create a new browsing context each time
+PASS `_blank` should be ASCII case-insensitive
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: Browsing context - `_blank` name keyword</title>
+<script src=""
+<script src=""
+<div id="log"></div>
+<script>
+test(t => {
+ var window1 = window.open('about:blank', '_blank');
+ var window2 = window.open('about:blank', '_blank');
+ var window3 = window.open('about:blank', '_blank');
+ t.add_cleanup(() => {
+ window1.close();
+ window2.close();
+ window3.close();
+ });
+ assert_not_equals(window1, window2);
+ assert_not_equals(window2, window3);
+ assert_not_equals(window1, window3);
+}, 'window.open into `_blank` should create a new browsing context each time');
+
+test(t => {
+ var window1 = window.open('about:blank', '_bLAnk');
+ var window2 = window.open('about:blank', '_bLAnk');
+ var window3 = window.open('about:blank', '_bLAnk');
+ t.add_cleanup(() => {
+ window1.close();
+ window2.close();
+ window3.close();
+ });
+ assert_not_equals(window1, window2);
+ assert_not_equals(window2, window3);
+ assert_not_equals(window1, window3);
+}, '`_blank` should be ASCII case-insensitive');
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -2,8 +2,8 @@
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is same as an existing browsing context's name</title>
<link rel="author" title="Intel" href=""
-<script src=""
-<script src=""
+<script src=""
+<script src=""
<div id="log"></div>
<iframe src="" style="display:none"></iframe>
<iframe name="existWin" style="display:none"></iframe>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,3 @@
+
+PASS The parent browsing context must be chosen if the given name is `_parent`
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: Choose browsing context - '_parent'</title>
+<link rel="author" title="Intel" href=""
+<script src=""
+<script src=""
+<div id="log"></div>
+<script>
+async_test(t => {
+ window.addEventListener('message', t.step_func_done(e => {
+ assert_equals(e.data.name, 'parentWin');
+ }));
+}, 'The parent browsing context must be chosen if the given name is `_parent`');
+</script>
+<iframe id="embedded" src="" name="parentWin" style="display:none"></iframe>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,3 @@
+
+PASS choosing _parent context: multiple nested contexts
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: Choose browsing context - '_parent' (nested contexts)</title>
+<script src=""
+<script src=""
+<div id="log"></div>
+<script>
+async_test(t => {
+ var topWindow;
+ t.add_cleanup(() => topWindow.close());
+ window.addEventListener('message', t.step_func_done(e => {
+ assert_equals(e.data.name, 'iframeParent');
+ assert_false(e.data.isTop, 'window.parent is not top');
+ }));
+ topWindow = window.open('resources/parent-top.html', '_blank');
+}, 'choosing _parent context: multiple nested contexts');
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,3 @@
+
+PASS _parent should reuse window.parent context
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: Choose browsing context - '_parent' (via window.open)</title>
+<script src=""
+<script src=""
+<div id="log"></div>
+<script>
+async_test(t => {
+ var topWindow;
+ t.add_cleanup(() => topWindow.close());
+ window.addEventListener('message', t.step_func_done(e => {
+ assert_equals(e.data.name, 'parentTopReplace');
+ assert_equals(e.data.isTop, true);
+ }));
+ topWindow = window.open('resources/parent-top-replace.html', 'parentTopReplace');
+}, '_parent should reuse window.parent context');
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,3 @@
+
+PASS choosing _parent context should be case-insensitive
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: Choose browsing context - '_parent' (case-sensitivity)</title>
+<script src=""
+<script src=""
+<div id="log"></div>
+<iframe src="" name="parentWin" style="display:none"></iframe>
+
+<script>
+async_test(t => {
+ window.addEventListener('message', t.step_func_done(e => {
+ assert_equals(e.data.name, 'parentWin', "The browsing context name should be 'parentWin'.");
+ assert_equals(e.data.isTop, false);
+ }));
+}, 'choosing _parent context should be case-insensitive');
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -2,8 +2,8 @@
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is '_self'</title>
<link rel="author" title="Intel" href=""
-<script src=""
-<script src=""
+<script src=""
+<script src=""
<div id="log"></div>
<iframe src="" style="display:none"></iframe>
<script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -2,8 +2,8 @@
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is empty string</title>
<link rel="author" title="Intel" href=""
-<script src=""
-<script src=""
+<script src=""
+<script src=""
<div id="log"></div>
<iframe src="" style="display:none"></iframe>
<script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt 2017-04-05 13:36:47 UTC (rev 214944)
@@ -1,5 +1,5 @@
-PASS A embedded browsing context has no default name
-PASS A browsing context which is opened by window.open() method with '_blank' parameter has no default name
-PASS A browsing context has no default name
-
+PASS A embedded browsing context has empty-string default name
+PASS A browsing context which is opened by window.open() method with '_blank' parameter has empty-string default name
+PASS A browsing context has an empty-string default name
+
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -2,25 +2,28 @@
<meta charset="utf-8">
<title>HTML Test: Browsing context - Default name</title>
<link rel="author" title="Intel" href=""
-<script src=""
-<script src=""
+<script src=""
+<script src=""
<div id="log"></div>
-<iframe src="" style="display:none"></iframe>
+<iframe src="" style="display:none"></iframe>
+<object id="obj" type="text/html" data=""
+<embed id="embedded" type="image/svg+xml" src="" width="0" height="0" />
<script>
+test(t => {
+ assert_equals(window.frames[0].name, "");
+ assert_equals(document.getElementById("embedded").name, "");
+ assert_equals(window["obj"].name, "");
+}, "A embedded browsing context has empty-string default name");
-test(function () {
- assert_equals(window.frames[0].name, "", "The browsing context should not have a default name.");
-}, "A embedded browsing context has no default name");
-
-test(function () {
+test(t => {
var win = window.open("about:blank", "_blank");
- assert_equals(win.name, "", "The browsing context should not have a name.");
+ assert_equals(win.name, "");
win.close();
-}, "A browsing context which is opened by window.open() method with '_blank' parameter has no default name");
+}, "A browsing context which is opened by window.open() method with '_blank' parameter has empty-string default name");
//This test must be run when the current browsing context's name is not set
-test(function () {
- assert_equals(window.name, "", "The browsing context should not have a name.");
-}, "A browsing context has no default name");
+test(t => {
+ assert_equals(window.name, "");
+}, "A browsing context has an empty-string default name");
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -5,7 +5,7 @@
<script>
function do_test() {
- window.open("message.html", "existWin");
+ window.open("resources/post-to-top.html", "existWin");
}
</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: browsing context name - parent</title>
+<link rel="author" title="Intel" href=""
+<iframe src=""
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html (from rev 214943, trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html) (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: browsing context name - parent</title>
+<link rel="author" title="Intel" href=""
+<script>
+
+window.open("post-to-top.html", "_parent");
+
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: browsing context name - parent</title>
+<script>
+window.open("post-to-opener.html", "_parent");
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: browsing context name - parent</title>
+<iframe src=""
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: browsing context name - parent (case-insensitive)</title>
+<script>
+
+window.open("post-to-top-or-close.html", "_pARent");
+
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: browsing context name - parent: nested context</title>
+<iframe name="iframeChild" src=""
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: browsing context name - parent: top-level context (gets replaced)</title>
+<iframe name="iframeOpener" src=""
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: browsing context name - parent: top-level context</title>
+<iframe name="iframeParent" src=""
+<script>
+// Relay a message from child context to opener context
+window.addEventListener('message', e => {
+ if (window.opener) {
+ window.opener.postMessage(e.data, '*');
+ }
+});
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: post window's name to top browsing context</title>
+<link rel="author" title="Intel" href=""
+<script>
+if (window.opener) {
+ window.opener.postMessage({
+ name: window.name,
+ isTop: (window.top === window)
+ }, "*");
+}
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: post window's name to top browsing context</title>
+<link rel="author" title="Intel" href=""
+<script>
+if (window.top === window) {
+ // This is an implicit failure; go ahead and close now
+ // so that this window isn't left hanging around
+ window.close();
+} else {
+ top.postMessage({
+ name: window.name,
+ isTop: (window.top === window)
+ }, "*");
+}
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: post window's name to top browsing context</title>
+<link rel="author" title="Intel" href=""
+<script>
+top.postMessage({
+ name: window.name,
+ isTop: (window.top === window)
+}, "*");
+</script>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log (from rev 214943, trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log) (0 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log 2017-04-05 13:36:47 UTC (rev 214944)
@@ -0,0 +1,28 @@
+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the W3C CSS or WPT github:
+ https://github.com/w3c/csswg-test
+ https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -5,7 +5,7 @@
<script>
window.name = "selfWin1";
-var win = window.open("message.html", "_self");
+var win = window.open("resources/post-to-top.html", "_self");
win.close();
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html 2017-04-05 13:36:47 UTC (rev 214944)
@@ -5,7 +5,7 @@
<script>
window.name = "selfWin2";
-var win = window.open("message.html", "");
+var win = window.open("resources/post-to-top.html", "");
win.close();
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log (214943 => 214944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log 2017-04-05 13:36:47 UTC (rev 214944)
@@ -19,14 +19,15 @@
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002-1.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html
-/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html
-/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/message.html
-/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/parent1.html
-/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/parent2.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html
/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html
Modified: trunk/Source/WebCore/ChangeLog (214943 => 214944)
--- trunk/Source/WebCore/ChangeLog 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/Source/WebCore/ChangeLog 2017-04-05 13:36:47 UTC (rev 214944)
@@ -1,3 +1,32 @@
+2017-04-05 Chris Dumez <[email protected]>
+
+ _blank / _self / _parent / _top browsing context names should be case-insensitive
+ https://bugs.webkit.org/show_bug.cgi?id=169747
+
+ Reviewed by Alex Christensen.
+
+ _blank / _self / _parent / _top browsing context names should be case-insensitive
+ as per the HTML specification:
+ - https://html.spec.whatwg.org/#browsing-context-names
+
+ This aligns our behavior with Firefox as well. See discussion at:
+ - https://github.com/whatwg/html/issues/2443
+
+ Tests: imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html
+ imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html
+ imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html
+ imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html
+ imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
+ (WebCore::createWindow):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::open):
+ * page/FrameTree.cpp:
+ (WebCore::FrameTree::uniqueChildName):
+ (WebCore::FrameTree::find):
+
2017-04-05 Miguel Gomez <[email protected]>
[GTK+] PNG animations that should run once are not played at all
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (214943 => 214944)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2017-04-05 13:36:47 UTC (rev 214944)
@@ -3198,7 +3198,7 @@
mainFrame->loader().forceSandboxFlags(frame->loader().effectiveSandboxFlags());
- if (frameName != "_blank")
+ if (!equalIgnoringASCIICase(frameName, "_blank"))
mainFrame->tree().setName(frameName);
mainFrame->page()->setOpenedByDOM();
@@ -3704,9 +3704,9 @@
created = false;
- if (!request.frameName().isEmpty() && request.frameName() != "_blank") {
+ if (!request.frameName().isEmpty() && !equalIgnoringASCIICase(request.frameName(), "_blank")) {
if (RefPtr<Frame> frame = lookupFrame.loader().findFrameForNavigation(request.frameName(), openerFrame.document())) {
- if (request.frameName() != "_self") {
+ if (!equalIgnoringASCIICase(request.frameName(), "_self")) {
if (Page* page = frame->page())
page->chrome().focus();
}
@@ -3742,7 +3742,7 @@
frame->loader().forceSandboxFlags(openerFrame.document()->sandboxFlags());
- if (request.frameName() != "_blank")
+ if (!equalIgnoringASCIICase(request.frameName(), "_blank"))
frame->tree().setName(request.frameName());
page->chrome().setToolbarsVisible(features.toolBarVisible || features.locationBarVisible);
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (214943 => 214944)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2017-04-05 13:36:47 UTC (rev 214944)
@@ -2263,9 +2263,9 @@
// Get the target frame for the special cases of _top and _parent.
// In those cases, we schedule a location change right now and return early.
Frame* targetFrame = nullptr;
- if (frameName == "_top")
+ if (equalIgnoringASCIICase(frameName, "_top"))
targetFrame = &m_frame->tree().top();
- else if (frameName == "_parent") {
+ else if (equalIgnoringASCIICase(frameName, "_parent")) {
if (Frame* parent = m_frame->tree().parent())
targetFrame = parent;
else
Modified: trunk/Source/WebCore/page/FrameTree.cpp (214943 => 214944)
--- trunk/Source/WebCore/page/FrameTree.cpp 2017-04-05 13:19:57 UTC (rev 214943)
+++ trunk/Source/WebCore/page/FrameTree.cpp 2017-04-05 13:36:47 UTC (rev 214944)
@@ -109,7 +109,7 @@
AtomicString FrameTree::uniqueChildName(const AtomicString& requestedName) const
{
// If the requested name (the frame's "name" attribute) is unique, just use that.
- if (!requestedName.isEmpty() && !child(requestedName) && requestedName != "_blank")
+ if (!requestedName.isEmpty() && !child(requestedName) && !equalIgnoringASCIICase(requestedName, "_blank"))
return requestedName;
// The "name" attribute was not unique or absent. Generate a name based on the
@@ -251,17 +251,18 @@
Frame* FrameTree::find(const AtomicString& name) const
{
- if (name == "_self" || name == "_current" || name.isEmpty())
+ // FIXME: _current is not part of the HTML specification.
+ if (equalIgnoringASCIICase(name, "_self") || name == "_current" || name.isEmpty())
return &m_thisFrame;
- if (name == "_top")
+ if (equalIgnoringASCIICase(name, "_top"))
return &top();
- if (name == "_parent")
+ if (equalIgnoringASCIICase(name, "_parent"))
return parent() ? parent() : &m_thisFrame;
// Since "_blank" should never be any frame's name, the following is only an optimization.
- if (name == "_blank")
+ if (equalIgnoringASCIICase(name, "_blank"))
return nullptr;
// Search subtree starting with this frame first.