<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[214944] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/214944">214944</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2017-04-05 06:36:47 -0700 (Wed, 05 Apr 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>_blank / _self / _parent / _top browsing context names should be case-insensitive
https://bugs.webkit.org/show_bug.cgi?id=169747

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

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:

Source/WebCore:

_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):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cresourcesimportexpectationsjson">trunk/LayoutTests/imported/w3c/resources/import-expectations.json</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnames001html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnames002html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseexistinghtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseself1html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseself2html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextdefaultnameexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextdefaultnamehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesexistinghtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesself1html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesself2html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameTreecpp">trunk/Source/WebCore/page/FrameTree.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontext_blankexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontext_blankhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent001expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent001html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent002expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent002html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent003expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent003html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent004expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent004html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframe1html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframe2html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframe3html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframeinsensitive1html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframeinsensitive2html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparenttopnestedhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparenttopreplacehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparenttophtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesposttoopenerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesposttotoporclosehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesposttotophtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2017-04-05  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        _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:
+
</ins><span class="cx"> 2017-03-31  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [css-grid] Update W3C Test Suite
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cresourcesimportexpectationsjson"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -199,6 +199,7 @@
</span><span class="cx">     &quot;web-platform-tests/html/browsers/sandboxing&quot;: &quot;skip&quot;, 
</span><span class="cx">     &quot;web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/&quot;: &quot;import&quot;, 
</span><span class="cx">     &quot;web-platform-tests/html/browsers/windows/browsing-context-first-created.xhtml&quot;: &quot;skip&quot;, 
</span><ins>+    &quot;web-platform-tests/html/browsers/windows/browsing-context-names&quot;: &quot;import&quot;, 
</ins><span class="cx">     &quot;web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.html&quot;: &quot;skip&quot;, 
</span><span class="cx">     &quot;web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.html&quot;: &quot;skip&quot;, 
</span><span class="cx">     &quot;web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html&quot;: &quot;skip&quot;, 
</span><span class="lines">@@ -323,4 +324,4 @@
</span><span class="cx">     &quot;web-platform-tests/webvr&quot;: &quot;skip&quot;, 
</span><span class="cx">     &quot;web-platform-tests/webvtt&quot;: &quot;skip&quot;, 
</span><span class="cx">     &quot;web-platform-tests/workers&quot;: &quot;skip&quot;
</span><del>-}
</del><ins>+}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnames001html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> &lt;!doctype html&gt;
</span><span class="cx"> &lt;title&gt;Link with target=_blank, rel=noreferrer&lt;/title&gt;
</span><del>-&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;a href=&quot;001-1.html&quot; rel=&quot;noreferrer&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;
</span><span class="cx"> &lt;script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnames002html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> &lt;!doctype html&gt;
</span><span class="cx"> &lt;title&gt;Link with target=_blank, no rel&lt;/title&gt;
</span><del>-&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;a href=&quot;002-1.html&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;
</span><span class="cx"> &lt;script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontext_blankexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS window.open into `_blank` should create a new browsing context each time 
+PASS `_blank` should be ASCII case-insensitive 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontext_blankhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: Browsing context - `_blank` name keyword&lt;/title&gt;
+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+test(t =&gt; {
+  var window1 = window.open('about:blank', '_blank');
+  var window2 = window.open('about:blank', '_blank');
+  var window3 = window.open('about:blank', '_blank');
+  t.add_cleanup(() =&gt; {
+    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 =&gt; {
+  var window1 = window.open('about:blank', '_bLAnk');
+  var window2 = window.open('about:blank', '_bLAnk');
+  var window3 = window.open('about:blank', '_bLAnk');
+  t.add_cleanup(() =&gt; {
+    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');
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseexistinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2,8 +2,8 @@
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;title&gt;HTML Test: Choose browsing context - the given name is same as an existing browsing context's name&lt;/title&gt;
</span><span class="cx"> &lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
</span><del>-&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;iframe src=&quot;existing.html&quot; style=&quot;display:none&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;iframe name=&quot;existWin&quot; style=&quot;display:none&quot;&gt;&lt;/iframe&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent001expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS The parent browsing context must be chosen if the given name is `_parent` 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent001html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: Choose browsing context - '_parent'&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+async_test(t =&gt; {
+  window.addEventListener('message', t.step_func_done(e =&gt; {
+    assert_equals(e.data.name, 'parentWin');
+  }));
+}, 'The parent browsing context must be chosen if the given name is `_parent`');
+&lt;/script&gt;
+&lt;iframe id=&quot;embedded&quot; src=&quot;resources/parent-iframe-1.html&quot; name=&quot;parentWin&quot; style=&quot;display:none&quot;&gt;&lt;/iframe&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent002expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS choosing _parent context: multiple nested contexts 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent002html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: Choose browsing context - '_parent' (nested contexts)&lt;/title&gt;
+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+async_test(t =&gt; {
+  var topWindow;
+  t.add_cleanup(() =&gt; topWindow.close());
+  window.addEventListener('message', t.step_func_done(e =&gt; {
+    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');
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent003expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS _parent should reuse window.parent context 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent003html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: Choose browsing context - '_parent' (via window.open)&lt;/title&gt;
+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+async_test(t =&gt; {
+  var topWindow;
+  t.add_cleanup(() =&gt; topWindow.close());
+  window.addEventListener('message', t.step_func_done(e =&gt; {
+    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');
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent004expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS choosing _parent context should be case-insensitive 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseparent004html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: Choose browsing context - '_parent' (case-sensitivity)&lt;/title&gt;
+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;iframe src=&quot;resources/parent-iframe-insensitive-1.html&quot; name=&quot;parentWin&quot; style=&quot;display:none&quot;&gt;&lt;/iframe&gt;
+
+&lt;script&gt;
+async_test(t =&gt; {
+  window.addEventListener('message', t.step_func_done(e =&gt; {
+    assert_equals(e.data.name, 'parentWin', &quot;The browsing context name should be 'parentWin'.&quot;);
+    assert_equals(e.data.isTop, false);
+  }));
+}, 'choosing _parent context should be case-insensitive');
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseself1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2,8 +2,8 @@
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;title&gt;HTML Test: Choose browsing context - the given name is '_self'&lt;/title&gt;
</span><span class="cx"> &lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
</span><del>-&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;iframe src=&quot;self1.html&quot; style=&quot;display:none&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextchooseself2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2,8 +2,8 @@
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;title&gt;HTML Test: Choose browsing context - the given name is empty string&lt;/title&gt;
</span><span class="cx"> &lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
</span><del>-&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;iframe src=&quot;self2.html&quot; style=&quot;display:none&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextdefaultnameexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-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 
-
</del><ins>+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 

</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesbrowsingcontextdefaultnamehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2,25 +2,28 @@
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;title&gt;HTML Test: Browsing context - Default name&lt;/title&gt;
</span><span class="cx"> &lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
</span><del>-&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../../../../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><del>-&lt;iframe src=&quot;message.html&quot; style=&quot;display:none&quot;&gt;&lt;/iframe&gt;
</del><ins>+&lt;iframe src=&quot;/common/blank.html&quot; style=&quot;display:none&quot;&gt;&lt;/iframe&gt;
+&lt;object id=&quot;obj&quot; type=&quot;text/html&quot; data=&quot;about:blank&quot;&gt;&lt;/object&gt;
+&lt;embed id=&quot;embedded&quot; type=&quot;image/svg+xml&quot; src=&quot;/images/green.svg&quot; width=&quot;0&quot; height=&quot;0&quot; /&gt;
</ins><span class="cx"> &lt;script&gt;
</span><ins>+test(t =&gt; {
+  assert_equals(window.frames[0].name, &quot;&quot;);
+  assert_equals(document.getElementById(&quot;embedded&quot;).name, &quot;&quot;);
+  assert_equals(window[&quot;obj&quot;].name, &quot;&quot;);
+}, &quot;A embedded browsing context has empty-string default name&quot;);
</ins><span class="cx"> 
</span><del>-test(function () {
-  assert_equals(window.frames[0].name, &quot;&quot;, &quot;The browsing context should not have a default name.&quot;);
-}, &quot;A embedded browsing context has no default name&quot;);
-
-test(function () {
</del><ins>+test(t =&gt; {
</ins><span class="cx">   var win = window.open(&quot;about:blank&quot;, &quot;_blank&quot;);
</span><del>-  assert_equals(win.name, &quot;&quot;, &quot;The browsing context should not have a name.&quot;);
</del><ins>+  assert_equals(win.name, &quot;&quot;);
</ins><span class="cx">   win.close();
</span><del>-}, &quot;A browsing context which is opened by window.open() method with '_blank' parameter has no default name&quot;);
</del><ins>+}, &quot;A browsing context which is opened by window.open() method with '_blank' parameter has empty-string default name&quot;);
</ins><span class="cx"> 
</span><span class="cx"> //This test must be run when the current browsing context's name is not set
</span><del>-test(function () {
-  assert_equals(window.name, &quot;&quot;, &quot;The browsing context should not have a name.&quot;);
-}, &quot;A browsing context has no default name&quot;);
</del><ins>+test(t =&gt; {
+  assert_equals(window.name, &quot;&quot;);
+}, &quot;A browsing context has an empty-string default name&quot;);
</ins><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesexistinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> 
</span><span class="cx"> function do_test() {
</span><del>-  window.open(&quot;message.html&quot;, &quot;existWin&quot;);
</del><ins>+  window.open(&quot;resources/post-to-top.html&quot;, &quot;existWin&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframe1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: browsing context name - parent&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
+&lt;iframe src=&quot;parent-iframe-2.html&quot;&gt;&lt;/iframe&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframe2htmlfromrev214943trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesexistinghtml"></a>
<div class="copfile"><h4>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)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: browsing context name - parent&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
+&lt;script&gt;
+
+window.open(&quot;post-to-top.html&quot;, &quot;_parent&quot;);
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframe3html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: browsing context name - parent&lt;/title&gt;
+&lt;script&gt;
+window.open(&quot;post-to-opener.html&quot;, &quot;_parent&quot;);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframeinsensitive1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: browsing context name - parent&lt;/title&gt;
+&lt;iframe src=&quot;parent-iframe-insensitive-2.html&quot;&gt;&lt;/iframe&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparentiframeinsensitive2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: browsing context name - parent (case-insensitive)&lt;/title&gt;
+&lt;script&gt;
+
+window.open(&quot;post-to-top-or-close.html&quot;, &quot;_pARent&quot;);
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparenttopnestedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: browsing context name - parent: nested context&lt;/title&gt;
+&lt;iframe name=&quot;iframeChild&quot; src=&quot;parent-iframe-2.html&quot;&gt;&lt;/iframe&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparenttopreplacehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: browsing context name - parent: top-level context (gets replaced)&lt;/title&gt;
+&lt;iframe name=&quot;iframeOpener&quot; src=&quot;parent-iframe-3.html&quot;&gt;&lt;/iframe&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesparenttophtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: browsing context name - parent: top-level context&lt;/title&gt;
+&lt;iframe name=&quot;iframeParent&quot; src=&quot;parent-top-nested.html&quot;&gt;&lt;/iframe&gt;
+&lt;script&gt;
+// Relay a message from child context to opener context
+window.addEventListener('message', e =&gt; {
+  if (window.opener) {
+    window.opener.postMessage(e.data, '*');
+  }
+});
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesposttoopenerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: post window's name to top browsing context&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
+&lt;script&gt;
+if (window.opener) {
+  window.opener.postMessage({
+    name: window.name,
+    isTop: (window.top === window)
+  }, &quot;*&quot;);
+}
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesposttotoporclosehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: post window's name to top browsing context&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
+&lt;script&gt;
+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)
+  }, &quot;*&quot;);
+}
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesposttotophtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html (0 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: post window's name to top browsing context&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
+&lt;script&gt;
+top.postMessage({
+  name: window.name,
+  isTop: (window.top === window)
+}, &quot;*&quot;);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesresourcesw3cimportlogfromrev214943trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesw3cimportlog"></a>
<div class="copfile"><h4>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)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+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
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesself1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> 
</span><span class="cx"> window.name = &quot;selfWin1&quot;;
</span><del>-var win = window.open(&quot;message.html&quot;, &quot;_self&quot;);
</del><ins>+var win = window.open(&quot;resources/post-to-top.html&quot;, &quot;_self&quot;);
</ins><span class="cx"> win.close();
</span><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesself2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> 
</span><span class="cx"> window.name = &quot;selfWin2&quot;;
</span><del>-var win = window.open(&quot;message.html&quot;, &quot;&quot;);
</del><ins>+var win = window.open(&quot;resources/post-to-top.html&quot;, &quot;&quot;);
</ins><span class="cx"> win.close();
</span><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowserswindowsbrowsingcontextnamesw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -19,14 +19,15 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002-1.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent.html
</del><ins>+/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
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html
</span><del>-/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
</del><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2017-04-05  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        _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):
+
</ins><span class="cx"> 2017-04-05  Miguel Gomez  &lt;magomez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK+] PNG animations that should run once are not played at all
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -3198,7 +3198,7 @@
</span><span class="cx"> 
</span><span class="cx">     mainFrame-&gt;loader().forceSandboxFlags(frame-&gt;loader().effectiveSandboxFlags());
</span><span class="cx"> 
</span><del>-    if (frameName != &quot;_blank&quot;)
</del><ins>+    if (!equalIgnoringASCIICase(frameName, &quot;_blank&quot;))
</ins><span class="cx">         mainFrame-&gt;tree().setName(frameName);
</span><span class="cx"> 
</span><span class="cx">     mainFrame-&gt;page()-&gt;setOpenedByDOM();
</span><span class="lines">@@ -3704,9 +3704,9 @@
</span><span class="cx"> 
</span><span class="cx">     created = false;
</span><span class="cx"> 
</span><del>-    if (!request.frameName().isEmpty() &amp;&amp; request.frameName() != &quot;_blank&quot;) {
</del><ins>+    if (!request.frameName().isEmpty() &amp;&amp; !equalIgnoringASCIICase(request.frameName(), &quot;_blank&quot;)) {
</ins><span class="cx">         if (RefPtr&lt;Frame&gt; frame = lookupFrame.loader().findFrameForNavigation(request.frameName(), openerFrame.document())) {
</span><del>-            if (request.frameName() != &quot;_self&quot;) {
</del><ins>+            if (!equalIgnoringASCIICase(request.frameName(), &quot;_self&quot;)) {
</ins><span class="cx">                 if (Page* page = frame-&gt;page())
</span><span class="cx">                     page-&gt;chrome().focus();
</span><span class="cx">             }
</span><span class="lines">@@ -3742,7 +3742,7 @@
</span><span class="cx"> 
</span><span class="cx">     frame-&gt;loader().forceSandboxFlags(openerFrame.document()-&gt;sandboxFlags());
</span><span class="cx"> 
</span><del>-    if (request.frameName() != &quot;_blank&quot;)
</del><ins>+    if (!equalIgnoringASCIICase(request.frameName(), &quot;_blank&quot;))
</ins><span class="cx">         frame-&gt;tree().setName(request.frameName());
</span><span class="cx"> 
</span><span class="cx">     page-&gt;chrome().setToolbarsVisible(features.toolBarVisible || features.locationBarVisible);
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2263,9 +2263,9 @@
</span><span class="cx">     // Get the target frame for the special cases of _top and _parent.
</span><span class="cx">     // In those cases, we schedule a location change right now and return early.
</span><span class="cx">     Frame* targetFrame = nullptr;
</span><del>-    if (frameName == &quot;_top&quot;)
</del><ins>+    if (equalIgnoringASCIICase(frameName, &quot;_top&quot;))
</ins><span class="cx">         targetFrame = &amp;m_frame-&gt;tree().top();
</span><del>-    else if (frameName == &quot;_parent&quot;) {
</del><ins>+    else if (equalIgnoringASCIICase(frameName, &quot;_parent&quot;)) {
</ins><span class="cx">         if (Frame* parent = m_frame-&gt;tree().parent())
</span><span class="cx">             targetFrame = parent;
</span><span class="cx">         else
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameTree.cpp (214943 => 214944)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> AtomicString FrameTree::uniqueChildName(const AtomicString&amp; requestedName) const
</span><span class="cx"> {
</span><span class="cx">     // If the requested name (the frame's &quot;name&quot; attribute) is unique, just use that.
</span><del>-    if (!requestedName.isEmpty() &amp;&amp; !child(requestedName) &amp;&amp; requestedName != &quot;_blank&quot;)
</del><ins>+    if (!requestedName.isEmpty() &amp;&amp; !child(requestedName) &amp;&amp; !equalIgnoringASCIICase(requestedName, &quot;_blank&quot;))
</ins><span class="cx">         return requestedName;
</span><span class="cx"> 
</span><span class="cx">     // The &quot;name&quot; attribute was not unique or absent. Generate a name based on the
</span><span class="lines">@@ -251,17 +251,18 @@
</span><span class="cx"> 
</span><span class="cx"> Frame* FrameTree::find(const AtomicString&amp; name) const
</span><span class="cx"> {
</span><del>-    if (name == &quot;_self&quot; || name == &quot;_current&quot; || name.isEmpty())
</del><ins>+    // FIXME: _current is not part of the HTML specification.
+    if (equalIgnoringASCIICase(name, &quot;_self&quot;) || name == &quot;_current&quot; || name.isEmpty())
</ins><span class="cx">         return &amp;m_thisFrame;
</span><span class="cx">     
</span><del>-    if (name == &quot;_top&quot;)
</del><ins>+    if (equalIgnoringASCIICase(name, &quot;_top&quot;))
</ins><span class="cx">         return &amp;top();
</span><span class="cx">     
</span><del>-    if (name == &quot;_parent&quot;)
</del><ins>+    if (equalIgnoringASCIICase(name, &quot;_parent&quot;))
</ins><span class="cx">         return parent() ? parent() : &amp;m_thisFrame;
</span><span class="cx"> 
</span><span class="cx">     // Since &quot;_blank&quot; should never be any frame's name, the following is only an optimization.
</span><del>-    if (name == &quot;_blank&quot;)
</del><ins>+    if (equalIgnoringASCIICase(name, &quot;_blank&quot;))
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     // Search subtree starting with this frame first.
</span></span></pre>
</div>
</div>

</body>
</html>