<!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>[243634] trunk/LayoutTests</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/243634">243634</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2019-03-28 18:43:31 -0700 (Thu, 28 Mar 2019)</dd>
</dl>
<h3>Log Message</h3>
<pre>Re-sync web-platform-tests/html/browsers/the-window-object/ from upstream
https://bugs.webkit.org/show_bug.cgi?id=196379
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
Re-sync web-platform-tests/html/browsers/the-window-object/ from upstream 3bfdeb8976fc.
* web-platform-tests/html/browsers/the-window-object/*: Updated.
LayoutTests:
* tests-options.json:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectaccessingotherbrowsingcontextsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/accessing-other-browsing-contexts/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameclose_script_deferhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_script_defer.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameopenfeaturestokenizationnoopenerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameopenfeaturestokenizationnoopenerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameresourcesmessageopenerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameresourcesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynamew3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectgarbagecollectionandbrowsingcontextsdiscard_iframe_history_3html">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_3.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectgarbagecollectionandbrowsingcontextsnonautomatedw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/non-automated/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectgarbagecollectionandbrowsingcontextsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindoww3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowopennoopenerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowopennoopenerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener.html</a></li>
<li><a href="#trunkLayoutTeststestsoptionsjson">trunk/LayoutTests/tests-options.json</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectBarPropwindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectBarPropwindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectBarPropwindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameopenfeaturestokenizationnoreferrerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameopenfeaturestokenizationnoreferrerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameresourcestokenizationnoopenernoreferrerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/tokenization-noopener-noreferrer.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosemethodwindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosemethodwindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosemethodwindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosedattributewindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosedattributewindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosedattributewindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectdocumentattributewindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectdocumentattributewindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectdocumentattributewindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectfocuswindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectfocuswindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectfocuswindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjecthistoricalwindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjecthistoricalwindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectlengthattributewindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectlengthattributewindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectlengthattributewindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnameattributewindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnameattributewindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnameattributewindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectnavigatednamedobjectswindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectnavigatednamedobjectswindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectnavigatednamedobjectswindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectwindownamedpropertiesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectwindownamedpropertieshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindowwindowsecurityhttpsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindowwindowsecurityhttpshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectselfetalwindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectselfetalwindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectselfetalwindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowopennoreferrerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowopennoreferrerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertieshttpsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertieshttpshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1importedw3cwebplatformtestshtmlbrowsersthewindowobjectBarPropwindowexpectedtxt">trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window-expected.txt</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindowwindowsecurityhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindownamedpropertiesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindownamedpropertieshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertieshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/ChangeLog 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2019-03-28 Chris Dumez <cdumez@apple.com>
+
+ Re-sync web-platform-tests/html/browsers/the-window-object/ from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=196379
+
+ Reviewed by Ryosuke Niwa.
+
+ * tests-options.json:
+
</ins><span class="cx"> 2019-03-28 John Wilander <wilander@apple.com>
</span><span class="cx">
</span><span class="cx"> Resource Load Statistics: IPC to the WebsiteDataStore in the UI process from NetworkProcess::deleteWebsiteDataForRegistrableDomains()
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2019-03-28 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Re-sync web-platform-tests/html/browsers/the-window-object/ from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=196379
+
+ Reviewed by Ryosuke Niwa.
+
+ Re-sync web-platform-tests/html/browsers/the-window-object/ from upstream 3bfdeb8976fc.
+
+ * web-platform-tests/html/browsers/the-window-object/*: Updated.
+
+2019-03-28 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Unreviewed, rebaseline web-platform-tests/html/dom/interfaces.html
</span><span class="cx">
</span><span class="cx"> * web-platform-tests/html/dom/interfaces-expected.txt:
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectBarPropwindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS BarBrop objects of a nested Window
+PASS BarProp objects of an auxiliary Window
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectBarPropwindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectBarPropwindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+function assert_barProps(barPropObjects, visible) {
+ let lastBarProp = undefined;
+ for (const currentBarProp of barPropObjects) {
+ assert_not_equals(currentBarProp, lastBarProp, "BarBrop objects of different properties are identical");
+ assert_equals(currentBarProp.visible, visible, "a BarProp's visible is wrong");
+ lastBarProp = currentBarProp;
+ }
+}
+
+function assert_identical_barProps(barProps, w, oldBarPropObjects, visible) {
+ barProps.map(val => w[val]).map((val, index) => {
+ assert_equals(val, oldBarPropObjects[index], "BarProp identity not preserved");
+ });
+ assert_barProps(oldBarPropObjects, visible);
+}
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe")),
+ frameW = frame.contentWindow,
+ barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"],
+ barPropObjects = barProps.map(val => frameW[val]);
+
+ assert_barProps(barPropObjects, true);
+ frame.remove();
+ assert_identical_barProps(barProps, frameW, barPropObjects, false);
+ t.step_timeout(() => {
+ assert_identical_barProps(barProps, frameW, barPropObjects, false);
+ t.done();
+ }, 0);
+}, "BarBrop objects of a nested Window");
+
+async_test(t => {
+ const openee = window.open("/common/blank.html"),
+ barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"],
+ barPropObjects = barProps.map(val => openee[val]);
+
+ // This is used to demonstrate that the Document is replaced while the global object (not the
+ // global this object) stays the same
+ openee.tiedToGlobalObject = openee.document;
+
+ assert_barProps(barPropObjects, true);
+ openee.onload = t.step_func(() => {
+ assert_own_property(openee, "tiedToGlobalObject");
+ assert_not_equals(openee.tiedToGlobalObject, openee.document);
+
+ assert_identical_barProps(barProps, openee, barPropObjects, true);
+
+ openee.onunload = t.step_func(() => {
+ assert_identical_barProps(barProps, openee, barPropObjects, true);
+ t.step_timeout(() => {
+ assert_identical_barProps(barProps, openee, barPropObjects, false);
+ t.done();
+ }, 0);
+ });
+
+ openee.close();
+ assert_identical_barProps(barProps, openee, barPropObjects, true);
+ });
+}, "BarProp objects of an auxiliary Window");
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectaccessingotherbrowsingcontextsw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/accessing-other-browsing-contexts/w3c-import.log (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/accessing-other-browsing-contexts/w3c-import.log 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/accessing-other-browsing-contexts/w3c-import.log 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> The tests in this directory were imported from the W3C repository.
</span><span class="cx"> Do NOT modify these tests directly in WebKit.
</span><span class="cx"> Instead, create a pull request on the WPT github:
</span><del>- https://github.com/w3c/web-platform-tests
</del><ins>+ https://github.com/web-platform-tests/wpt
</ins><span class="cx">
</span><span class="cx"> Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameclose_script_deferhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_script_defer.html (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_script_defer.html 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_script_defer.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> <script src="/resources/testharnessreport.js"></script>
</span><span class="cx"> <div id="log"></div>
</span><span class="cx"> <script>
</span><del>-var t = async_test(undefined, {timeout:4000});
</del><ins>+var t = async_test();
</ins><span class="cx"> t.step(function() {
</span><span class="cx"> var w = window.open("close_script_defer-1.html");
</span><span class="cx"> w.document.open()
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameopenfeaturestokenizationnoopenerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx">
</span><del>-PASS tokenization should skip window features separators before `name`
-PASS feature `name` should be converted to ASCII lowercase
-PASS after `name`, tokenization should skip window features separators that are not "=" or ","
-PASS Tokenizing should ignore window feature separators except "," after initial "=" and before value
-PASS Tokenizing should read characters until first window feature separator as `value`
</del><ins>+PASS Tokenization of "noopener" should skip window features separators before feature
+PASS Feature "noopener" should be converted to ASCII lowercase
+PASS After "noopener", tokenization should skip window features separators that are not "=" or ","
+PASS Tokenizing "noopener" should ignore window feature separators except "," after initial "=" and before value
+PASS Tokenizing "noopener" should read characters until first window feature separator as `value`
</ins><span class="cx"> PASS Integer values other than 0 should activate the feature
</span><del>-PASS Integer value of 0 should not activate the feature
-PASS invalid feature names should not tokenize as "noopener"
</del><ins>+PASS Integer value of 0 should not activate "noopener"
+PASS Invalid feature names should not tokenize as "noopener"
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameopenfeaturestokenizationnoopenerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -5,158 +5,7 @@
</span><span class="cx"> <link rel="help" href="https://html.spec.whatwg.org/multipage/#apis-for-creating-and-navigating-browsing-contexts-by-name">
</span><span class="cx"> <script src="/resources/testharness.js"></script>
</span><span class="cx"> <script src="/resources/testharnessreport.js"></script>
</span><ins>+<script src="resources/tokenization-noopener-noreferrer.js"></script>
</ins><span class="cx"> <script>
</span><del>-var windowURL = 'resources/close-self.html';
-
-// Tests for how windows features are tokenized into 'name', 'value'
-// window features separators are ASCII whitespace, '=' and ','
-
-test (t => {
- // Tokenizing `name`: initial window features separators are ignored
- // Each of these variants should tokenize to ('noopener', '')
- var featureVariants = [
- ' noopener',
- '=noopener',
- ',,noopener',
- ',=, noopener',
- '\n=noopener=',
- '\tnoopener',
- '\r,,,=noopener',
- '\u000Cnoopener'
- ];
- featureVariants.forEach(feature => {
- var win = window.open(windowURL, '', feature);
- assert_equals(win, null, `"${feature}" should activate feature "noopener"`);
- });
-}, 'tokenization should skip window features separators before `name`');
-
-test (t => {
- // Tokenizing `name`: lowercase conversion
- // Each of these variants should tokenize as feature ('noopener', '')
- // except where indicated
- // Note also that `value` is lowercased during tokenization
- var featureVariants = [
- 'NOOPENER',
- 'noOpenER',
- ' NOopener',
- '=NOOPENER',
- 'noopener=1',
- 'NOOPENER=1',
- 'NOOPENER=yes',
- 'noopener=YES',
- ];
- featureVariants.forEach(feature => {
- var win = window.open(windowURL, '', feature);
- assert_equals(win, null, `"${feature}" should activate feature "noopener"`);
- });
-}, 'feature `name` should be converted to ASCII lowercase');
-
-test (t => {
- // After `name` has been collected, ignore any window features separators until '='
- // except ',' OR a non-window-features-separator — break in those cases
- // i.e. ignore whitespace until '=' unless a ',' is encountered first
- // Each of these variants should tokenize as feature ('noopener', '')
- var featureVariants = [
- 'noopener',
- ' noopener\r',
- 'noopener\n =',
- 'noopener,',
- 'noopener =,',
- ', noopener =',
- 'noopener,=',
- 'noopener foo', // => ('noopener', ''), ('foo', '')
- 'foo noopener=1', // => ('foo', ''), ('noopener', '1')
- 'foo=\u000Cbar\u000Cnoopener' // => ('foo', 'bar'), ('noopener', '')
- ];
- featureVariants.forEach(feature => {
- var win = window.open(windowURL, '', feature);
- assert_equals(win, null, `"${feature}" should activate feature "noopener"`);
- });
-}, 'after `name`, tokenization should skip window features separators that are not "=" or ","');
-
-test (t => {
- // After initial '=', tokenizing should ignore all separators except ','
- // before collecting `value`
- // Each of these variants should tokenize as feature ('noopener', '')
- // Except where indicated
- var featureVariants = [
- 'noopener= yes', // => ('noopener', 'yes')
- 'noopener==,',
- 'noopener=\n ,',
- 'noopener = \t ,',
- 'noopener\n=\r 1,', // => ('noopener', '1')
- 'noopener=,yes', // => ('noopener'), ('yes')
- 'noopener= yes=,', // => ('noopener', 'yes')
- 'noopener = \u000Cyes' // => ('noopener', 'yes')
- ];
- featureVariants.forEach(feature => {
- var win = window.open(windowURL, '', feature);
- assert_equals(win, null, `"${feature}" should activate feature "noopener"`);
- });
-}, 'Tokenizing should ignore window feature separators except "," after initial "=" and before value');
-
-test (t => {
- // Tokenizing `value` should collect any non-separator code points until first separator
- var featureVariants = [
- 'noopener=1', // => ('noopener', 'noopener')
- 'noopener=yes', // => ('noopener', 'yes')
- 'noopener = yes ,', // => ('noopener', 'yes')
- 'noopener=\nyes ,', // => ('noopener', 'yes')
- 'noopener=yes yes', // => ('noopener', 'yes'), ('yes', '')
- 'noopener=yes\ts', // => ('noopener', 'yes'), ('s', '')
- 'noopener==', // => ('noopener', '')
- 'noopener=1\n,', // => ('noopener', '1')
- '==noopener===', // => ('noopener', '')
- 'noopener==\u000C' // => ('noopener', '')
- ];
- featureVariants.forEach(feature => {
- var win = window.open(windowURL, '', feature);
- assert_equals(win, null, `"${feature}" should set "noopener"`);
- });
-}, 'Tokenizing should read characters until first window feature separator as `value`');
-
-test (t => {
- var featureVariants = [
- 'noopener=1',
- 'noopener=2',
- 'noopener=12345',
- 'noopener=1.5',
- 'noopener=-1',
- ];
- featureVariants.forEach(feature => {
- var win = window.open(windowURL, '', feature);
- assert_equals(win, null, `"${feature}" should activate feature "noopener"`);
- });
-}, 'Integer values other than 0 should activate the feature');
-
-test (t => {
- var featureVariants = [
- 'noopener=0',
- 'noopener=0.5',
- 'noopener=error',
- ];
- featureVariants.forEach(feature => {
- var win = window.open(windowURL, '', feature);
- assert_not_equals(win, null, `"${feature}" should NOT activate feature "noopener"`);
- });
-}, 'Integer value of 0 should not activate the feature');
-
-test (t => {
- var invalidFeatureVariants = [
- '-noopener', // => ('-noopener', '')
- 'NOOPENERRRR', // => ('noopenerrr', '')
- 'noOpenErR', // => ('noopenerr', '')
- 'no_opener', // => ('no_opener', '')
- ' no opener', // => ('no', ''), ('opener', '')
- 'no\nopener', // => ('no', ''), ('opener', '')
- 'no,opener', // => ('no', ''), ('opener', '')
- '\0noopener', // => ('\0noopener', '')
- 'noopener\u0000=yes', // => ('noopener\0', 'yes')
- 'foo=\u000Cnoopener' // => ('foo', 'noopener')
- ];
- invalidFeatureVariants.forEach(feature => {
- var win = window.open(windowURL, '', feature);
- assert_not_equals(win, null, `"${feature}" should NOT activate feature "noopener"`);
- });
-}, 'invalid feature names should not tokenize as "noopener"');
</del><ins>+ booleanTests("noopener");
</ins><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameopenfeaturestokenizationnoreferrerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+FAIL Tokenization of "noreferrer" should skip window features separators before feature assert_equals: " noreferrer" should activate feature "noreferrer" expected null but got object "[object Window]"
+FAIL Feature "noreferrer" should be converted to ASCII lowercase assert_equals: "NOREFERRER" should activate feature "noreferrer" expected null but got object "[object Window]"
+FAIL After "noreferrer", tokenization should skip window features separators that are not "=" or "," assert_equals: "noreferrer" should activate feature "noreferrer" expected null but got object "[object Window]"
+FAIL Tokenizing "noreferrer" should ignore window feature separators except "," after initial "=" and before value assert_equals: "noreferrer= yes" should activate feature "noreferrer" expected null but got object "[object Window]"
+FAIL Tokenizing "noreferrer" should read characters until first window feature separator as `value` assert_equals: "noreferrer=1" should set "noreferrer" expected null but got object "[object Window]"
+FAIL Integer values other than 0 should activate the feature assert_equals: "noreferrer=1" should activate feature "noreferrer" expected null but got object "[object Window]"
+PASS Integer value of 0 should not activate "noreferrer"
+PASS Invalid feature names should not tokenize as "noreferrer"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameopenfeaturestokenizationnoreferrerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML: window.open `features`: tokenization -- `noreferrer`</title>
+<meta name=timeout content=long>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#apis-for-creating-and-navigating-browsing-contexts-by-name">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/tokenization-noopener-noreferrer.js"></script>
+<script>
+ booleanTests("noreferrer");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameresourcesmessageopenerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,12 +1,12 @@
</span><span class="cx"> <script src="/common/PrefixedPostMessage.js"></script>
</span><span class="cx"> <script>
</span><span class="cx"> var prefixedMessage = new PrefixedMessageResource();
</span><del>-var max = 50, attempts = 0;
</del><ins>+var max = 150, attempts = 0;
</ins><span class="cx"> function sendCoordinates() {
</span><span class="cx"> // Certain windowing systems position windows asynchronously.
</span><span class="cx"> // As a result, the window may not be positioned yet when the
</span><span class="cx"> // load event fires. To accommodate this, allow waiting up to
</span><del>- // 5 seconds for positioning to take place.
</del><ins>+ // 15 seconds for positioning to take place.
</ins><span class="cx"> if (!window.screenX && !window.screenY && ++attempts < max) {
</span><span class="cx"> setTimeout(sendCoordinates, 100);
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameresourcestokenizationnoopenernoreferrerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/tokenization-noopener-noreferrer.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/tokenization-noopener-noreferrer.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/tokenization-noopener-noreferrer.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,152 @@
</span><ins>+function booleanTests(feature) {
+ const windowURL = 'resources/close-self.html';
+ // Tests for how windows features are tokenized into 'name', 'value'
+ // window features separators are ASCII whitespace, '=' and ','
+
+ const featureUpper = feature.toUpperCase(),
+ featureSplitBegin = feature.slice(0, 2),
+ featureSplitEnd = feature.slice(2),
+ featureMixedCase = featureSplitBegin.toUpperCase() + featureSplitEnd;
+ featureMixedCase2 = featureSplitBegin + featureSplitEnd.toUpperCase();
+
+ test (t => {
+ // Tokenizing `name`: initial window features separators are ignored
+ // Each of these variants should tokenize to (`${feature}`, '')
+ [
+ ` ${feature}`,
+ `=${feature}`,
+ `,,${feature}`,
+ `,=, ${feature}`,
+ `\n=${feature}=`,
+ `\t${feature}`,
+ `\r,,,=${feature}`,
+ `\u000C${feature}`
+ ].forEach(variant => {
+ const win = window.open(windowURL, "", variant);
+ assert_equals(win, null, `"${variant}" should activate feature "${feature}"`);
+ });
+ }, `Tokenization of "${feature}" should skip window features separators before feature`);
+
+ test (t => {
+ // Tokenizing `name`: lowercase conversion
+ // Each of these variants should tokenize as feature (`${feature}`, '')
+ // except where indicated
+ // Note also that `value` is lowercased during tokenization
+ [
+ `${featureUpper}`,
+ `${featureMixedCase}`,
+ ` ${featureMixedCase2}`,
+ `=${featureUpper}`,
+ `${featureUpper}=1`,
+ `${featureUpper}=1`,
+ `${featureUpper}=yes`,
+ `${feature}=YES`,
+ ].forEach(variant => {
+ const win = window.open(windowURL, '', variant);
+ assert_equals(win, null, `"${variant}" should activate feature "${feature}"`);
+ });
+ }, `Feature "${feature}" should be converted to ASCII lowercase`);
+
+ test (t => {
+ // After `name` has been collected, ignore any window features separators until '='
+ // except ',' OR a non-window-features-separator — break in those cases
+ // i.e. ignore whitespace until '=' unless a ',' is encountered first
+ // Each of these variants should tokenize as feature ('noopener', '')
+ [
+ `${feature}`,
+ ` ${feature}\r`,
+ `${feature}\n =`,
+ `${feature},`,
+ `${feature} =,`,
+ `, ${feature} =`,
+ `${feature},=`,
+ `${feature} foo`,
+ `foo ${feature}=1`,
+ `foo=\u000Cbar\u000C${feature}`
+ ].forEach(variant => {
+ const win = window.open(windowURL, '', variant);
+ assert_equals(win, null, `"${variant}" should activate feature "${feature}"`);
+ });
+ }, `After "${feature}", tokenization should skip window features separators that are not "=" or ","`);
+
+ test (t => {
+ // After initial '=', tokenizing should ignore all separators except ','
+ // before collecting `value`
+ // Each of these variants should tokenize as feature ('noopener', '')
+ // Except where indicated
+ [
+ `${feature}= yes`,
+ `${feature}==,`,
+ `${feature}=\n ,`,
+ `${feature} = \t ,`,
+ `${feature}\n=\r 1,`,
+ `${feature}=,yes`,
+ `${feature}= yes=,`,
+ `${feature} = \u000Cyes`
+ ].forEach(variant => {
+ const win = window.open(windowURL, '', variant);
+ assert_equals(win, null, `"${variant}" should activate feature "${feature}"`);
+ });
+ }, `Tokenizing "${feature}" should ignore window feature separators except "," after initial "=" and before value`);
+
+ test (t => {
+ // Tokenizing `value` should collect any non-separator code points until first separator
+ [
+ `${feature}=1`,
+ `${feature}=yes`,
+ `${feature} = yes ,`,
+ `${feature}=\nyes ,`,
+ `${feature}=yes yes`,
+ `${feature}=yes\ts`,
+ `${feature}==`,
+ `${feature}=1\n,`,
+ `==${feature}===`,
+ `${feature}==\u000C`
+ ].forEach(variant => {
+ const win = window.open(windowURL, '', variant);
+ assert_equals(win, null, `"${variant}" should set "${feature}"`);
+ });
+ }, `Tokenizing "${feature}" should read characters until first window feature separator as \`value\``);
+
+ test (t => {
+ [
+ `${feature}=1`,
+ `${feature}=2`,
+ `${feature}=12345`,
+ `${feature}=1.5`,
+ `${feature}=-1`,
+ ].forEach(variant => {
+ const win = window.open(windowURL, '', variant);
+ assert_equals(win, null, `"${variant}" should activate feature "${feature}"`);
+ });
+ }, 'Integer values other than 0 should activate the feature');
+
+ test (t => {
+ [
+ `${feature}=0`,
+ `${feature}=0.5`,
+ `${feature}=error`,
+ ].forEach(variant => {
+ const win = window.open(windowURL, '', variant);
+ assert_not_equals(win, null, `"${variant}" should NOT activate feature "${feature}"`);
+ });
+ }, `Integer value of 0 should not activate "${feature}"`);
+
+ test (t => {
+ [
+ `-${feature}`,
+ `${featureUpper}RRR`,
+ `${featureMixedCase}R`,
+ `${featureSplitBegin}_${featureSplitEnd}`,
+ ` ${featureSplitBegin} ${featureSplitEnd}`,
+ `${featureSplitBegin}\n${featureSplitEnd}`,
+ `${featureSplitBegin},${featureSplitEnd}`,
+ `\0${feature}`,
+ `${feature}\u0000=yes`,
+ `foo=\u000C${feature}`
+ ].forEach(variant => {
+ const win = window.open(windowURL, '', variant);
+ assert_not_equals(win, null, `"${variant}" should NOT activate feature "${feature}"`);
+ });
+ }, `Invalid feature names should not tokenize as "${feature}"`);
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynameresourcesw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/w3c-import.log (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/w3c-import.log 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/w3c-import.log 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -16,3 +16,4 @@
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/close-self.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/tokenization-noopener-noreferrer.js
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectapisforcreatingandnavigatingbrowsingcontextsbynamew3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/w3c-import.log (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/w3c-import.log 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/w3c-import.log 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-innerheight-innerwidth.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-screenx-screeny.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-top-left.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-width-height.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosemethodwindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL window.close() queues a task to discard, but window.closed knows immediately assert_equals: expected true but got false
+FAIL window.close() affects name targeting immediately assert_equals: expected true but got false
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosemethodwindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosemethodwindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+function assert_closed_opener(w, closed, opener) {
+ assert_equals(w.closed, closed);
+ assert_equals(w.opener, opener);
+}
+
+async_test(t => {
+ const openee = window.open();
+ assert_closed_opener(openee, false, self);
+ openee.onunload = t.step_func(() => {
+ assert_closed_opener(openee, true, self);
+ t.step_timeout(() => {
+ assert_closed_opener(openee, true, null);
+ t.done();
+ }, 0);
+ });
+ openee.close();
+ assert_closed_opener(openee, true, self);
+}, "window.close() queues a task to discard, but window.closed knows immediately");
+
+async_test(t => {
+ const openee = window.open("", "greatname");
+ assert_closed_opener(openee, false, self);
+ openee.close();
+ assert_closed_opener(openee, true, self);
+ const openee2 = window.open("", "greatname");
+ assert_not_equals(openee, openee2);
+ assert_closed_opener(openee, true, self); // Ensure second window.open() call was synchronous
+ openee2.onunload = t.step_func(() => {
+ assert_closed_opener(openee2, true, self);
+ t.step_timeout(() => {
+ assert_closed_opener(openee, true, null);
+ assert_closed_opener(openee2, true, null);
+ t.done();
+ }, 0);
+ });
+ openee2.close();
+ assert_closed_opener(openee, true, self); // Ensure second close() call was synchronous
+ assert_closed_opener(openee2, true, self);
+}, "window.close() affects name targeting immediately");
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosedattributewindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+Harness Error (TIMEOUT), message = null
+
+PASS closed and same-origin nested browsing context
+FAIL closed/close() and same-origin auxiliary browsing context assert_equals: expected true but got false
+TIMEOUT closed and cross-origin nested browsing context Test timed out
+TIMEOUT closed/close() and cross-origin auxiliary browsing context Test timed out
+TIMEOUT closed and cross-site nested browsing context Test timed out
+TIMEOUT closed/close() and cross-site auxiliary browsing context Test timed out
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosedattributewindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectclosedattributewindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+// META: script=/common/get-host-info.sub.js
+
+function closedTest(newWindow, closeNewWindowsBrowsingContext) {
+ assert_equals(newWindow.closed, false);
+ closeNewWindowsBrowsingContext();
+ assert_equals(newWindow.closed, true);
+}
+
+test(() => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ closedTest(frame.contentWindow, () => frame.remove());
+}, "closed and same-origin nested browsing context");
+
+test(() => {
+ const openee = window.open();
+ closedTest(openee, () => openee.close());
+
+ // close() is a no-op once "is closing" is set
+ openee.close();
+ assert_equals(openee.closed, true);
+}, "closed/close() and same-origin auxiliary browsing context");
+
+const support = new URL("support/closed.html", location.href).pathname;
+[
+ {
+ type: "cross-origin",
+ url: `${get_host_info().HTTP_REMOTE_ORIGIN}${support}`
+ },
+ {
+ type: "cross-site",
+ url: `${get_host_info().HTTP_NOTSAMESITE_ORIGIN}${support}`
+ }
+].forEach(val => {
+ async_test(t => {
+ const frame = document.createElement("iframe"),
+ ident = `${val.type}-nested-bc`;
+ frame.src = `${val.url}?window=parent&ident=${ident}`;
+ const listener = t.step_func(e => {
+ if (e.data === ident) {
+ closedTest(frame.contentWindow, () => frame.remove());
+ self.removeEventListener("message", listener);
+ t.done();
+ }
+ });
+ // Use a message event rather than onload for consistency with auxiliary browsing contexts.
+ self.addEventListener("message", listener);
+ document.body.append(frame);
+ }, `closed and ${val.type} nested browsing context`);
+
+ async_test(t => {
+ const ident = `${val.type}-auxiliary-bc`,
+ support = new URL("support/closed.html", location.href).pathname,
+ openee = window.open(`${val.url}?window=opener&ident=${ident}`),
+ listener = t.step_func(e => {
+ if (e.data === ident) {
+ closedTest(openee, () => openee.close());
+
+ // close() is a no-op once "is closing" is set
+ openee.close();
+ assert_equals(openee.closed, true);
+
+ self.removeEventListener("message", listener);
+ t.done();
+ }
+ });
+ // As there's no cross-origin onload, use a message event.
+ self.addEventListener("message", listener);
+ }, `closed/close() and ${val.type} auxiliary browsing context`);
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectdocumentattributewindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS Window object's document IDL attribute and discarding the browsing context
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectdocumentattributewindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectdocumentattributewindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+async_test(t => {
+ const frame = document.createElement("iframe");
+ frame.onload = t.step_func(() => {
+ const frameW = frame.contentWindow,
+ frameD = frame.contentDocument;
+ assert_equals(frameW.document, frameD);
+ frame.remove();
+ assert_equals(frameW.document, frameD);
+ t.step_timeout(() => {
+ assert_equals(frameW.document, frameD);
+ t.done();
+ }, 100);
+ });
+ document.body.append(frame);
+}, "Window object's document IDL attribute and discarding the browsing context");
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectfocuswindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS Untitled
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectfocuswindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectfocuswindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+async_test(t => {
+ const input = document.body.appendChild(document.createElement("input"));
+ input.onfocus = t.step_func(() => {
+ const frame = document.body.appendChild(document.createElement("iframe")),
+ frameW = frame.contentWindow;
+ frameW.onfocus = t.unreached_func();
+ frame.remove();
+ frameW.focus();
+ t.step_timeout(() => {
+ assert_equals(document.activeElement, input);
+ t.done();
+ }, 100);
+ });
+ input.focus();
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectgarbagecollectionandbrowsingcontextsdiscard_iframe_history_3html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_3.html (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_3.html 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_3.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -4,6 +4,6 @@
</span><span class="cx"> <script src="/resources/testharnessreport.js"></script>
</span><span class="cx"> <div id="log"></div>
</span><span class="cx"> <script>
</span><del>-var t = async_test(undefined);
</del><ins>+var t = async_test();
</ins><span class="cx"> var w = window.open("discard_iframe_history_3-1.html");
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectgarbagecollectionandbrowsingcontextsnonautomatedw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/non-automated/w3c-import.log (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/non-automated/w3c-import.log 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/non-automated/w3c-import.log 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> The tests in this directory were imported from the W3C repository.
</span><span class="cx"> Do NOT modify these tests directly in WebKit.
</span><span class="cx"> Instead, create a pull request on the WPT github:
</span><del>- https://github.com/w3c/web-platform-tests
</del><ins>+ https://github.com/web-platform-tests/wpt
</ins><span class="cx">
</span><span class="cx"> Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectgarbagecollectionandbrowsingcontextsw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/w3c-import.log (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/w3c-import.log 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/w3c-import.log 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> The tests in this directory were imported from the W3C repository.
</span><span class="cx"> Do NOT modify these tests directly in WebKit.
</span><span class="cx"> Instead, create a pull request on the WPT github:
</span><del>- https://github.com/w3c/web-platform-tests
</del><ins>+ https://github.com/web-platform-tests/wpt
</ins><span class="cx">
</span><span class="cx"> Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjecthistoricalwindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL showModalDialog() has been removed from the platform assert_false: expected false got true
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjecthistoricalwindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectlengthattributewindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS Window object's length IDL attribute (and named access)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectlengthattributewindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectlengthattributewindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+async_test(t => {
+ const frame = document.createElement("iframe");
+ frame.srcdoc = "<iframe name=x srcdoc='<iframe name=z></iframe>'></iframe><iframe name=y></iframe>";
+ frame.onload = t.step_func_done(() => {
+ const frameW = frame.contentWindow;
+ assert_equals(frameW.length, 2);
+ assert_not_equals(frameW.x, undefined);
+ assert_not_equals(frameW.y, undefined);
+ assert_equals(frameW.z, undefined);
+ assert_equals(frameW.x, frameW[0]);
+ assert_equals(frameW.y, frameW[1]);
+ const xFrameW = frameW.x;
+ assert_equals(xFrameW.length, 1);
+ assert_not_equals(xFrameW.z, undefined);
+ assert_equals(xFrameW.z, xFrameW[0]);
+ frame.remove();
+ assert_equals(frameW.length, 0);
+ assert_equals(frameW.x, undefined);
+ assert_equals(frameW[0], undefined);
+ assert_equals(xFrameW.length, 0);
+ assert_equals(xFrameW.z, undefined);
+ });
+ document.body.append(frame);
+}, "Window object's length IDL attribute (and named access)");
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnameattributewindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS Window object's name IDL attribute
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnameattributewindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnameattributewindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+test(() => {
+ const frame = document.createElement("iframe"),
+ name = "A",
+ name2 = "B";
+ frame.setAttribute("name", name);
+ document.body.append(frame);
+ const frameW = frame.contentWindow;
+ assert_equals(frameW.name, name);
+ frameW.name = name2;
+ assert_equals(frame.getAttribute("name"), name);
+ assert_equals(frameW.name, name2);
+ frame.remove();
+ assert_equals(frame.getAttribute("name"), name);
+ assert_equals(frameW.name, "");
+ frameW.name = name2;
+ assert_equals(frame.getAttribute("name"), name);
+ assert_equals(frameW.name, "");
+}, "Window object's name IDL attribute");
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectnavigatednamedobjectswindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+
+PASS Window's associated Document object is used for finding named objects (<div> via srcdoc <iframe>)
+PASS Window's associated Document object is used for finding named objects (<object> via srcdoc <iframe>)
+PASS Window's associated Document object is used for finding named objects (<iframe> via srcdoc <iframe>)
+FAIL Window's associated Document object is used for finding named objects (<object> with browsing ccontext via srcdoc <iframe)> assert_equals: expected (object) null but got (undefined) undefined
+FAIL Window's associated Document object is used for finding named objects (<div> via same-origin <iframe>) f is not a function. (In 'f()', 'f' is undefined)
+FAIL Window's associated Document object is used for finding named objects (<object> via same-origin <iframe>) f is not a function. (In 'f()', 'f' is undefined)
+FAIL Window's associated Document object is used for finding named objects (<iframe> via same-origin <iframe>) f is not a function. (In 'f()', 'f' is undefined)
+FAIL Window's associated Document object is used for finding named objects (<object> with browsing ccontext via same-origin <iframe)> f is not a function. (In 'f()', 'f' is undefined)
+FAIL Window's associated Document object is used for finding named objects (<div> via cross-site <iframe>) f is not a function. (In 'f()', 'f' is undefined)
+FAIL Window's associated Document object is used for finding named objects (<object> via cross-site <iframe>) f is not a function. (In 'f()', 'f' is undefined)
+FAIL Window's associated Document object is used for finding named objects (<iframe> via cross-site <iframe>) f is not a function. (In 'f()', 'f' is undefined)
+FAIL Window's associated Document object is used for finding named objects (<object> with browsing ccontext via cross-site <iframe)> f is not a function. (In 'f()', 'f' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectnavigatednamedobjectswindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectnavigatednamedobjectswindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+// META: script=/common/get-host-info.sub.js
+
+function echoURL(content) {
+ return `/common/echo.py?content=${encodeURIComponent(content)}`;
+}
+
+function setSrc(frame, type, content) {
+ if (type === "same-origin") {
+ frame.src = echoURL(content);
+ } else if (type === "cross-site") {
+ frame.src = `${get_host_info().HTTP_NOTSAMESITE_ORIGIN}${echoURL(content)}`;
+ } else {
+ frame.srcdoc = content;
+ }
+}
+
+["srcdoc", "same-origin", "cross-site"].forEach(type => {
+ const initialType = type === "srcdoc" ? type : "same-origin";
+
+ [
+ {
+ "namedObject": "<div id=abc></div>",
+ "namedObjectLocalName": "div"
+ },
+ {
+ "namedObject": "<object name=abc></object>",
+ "namedObjectLocalName": "object"
+ },
+ {
+ "namedObject": "<iframe id=abc></iframe>",
+ "namedObjectLocalName": "iframe"
+ }
+ ].forEach(testData => {
+ async_test(t => {
+ const frame = document.createElement("iframe");
+ t.add_cleanup(() => frame.remove());
+ setSrc(frame, initialType, `<script>function f() { return abc }</script>${testData.namedObject}`);
+ frame.onload = t.step_func(() => {
+ const f = frame.contentWindow.f,
+ associatedAbc = f();
+ frame.onload = t.step_func_done(() => {
+ assert_equals(f(), associatedAbc);
+ assert_equals(associatedAbc.localName, testData.namedObjectLocalName);
+ });
+ setSrc(frame, type, "<span id=abc></span>");
+ });
+ document.body.append(frame);
+ }, `Window's associated Document object is used for finding named objects (<${testData.namedObjectLocalName}> via ${type} <iframe>)`);
+ });
+
+ async_test(t => {
+ const frame = document.createElement("iframe");
+ t.add_cleanup(() => frame.remove());
+ setSrc(frame, initialType, "<script>function f() { return abc }</script><object name=abc data='about:blank'></object>");
+ frame.onload = t.step_func(() => {
+ const f = frame.contentWindow.f,
+ associatedAbc = f(),
+ associatedAbcContainer = associatedAbc.frameElement;
+ frame.onload = t.step_func_done(() => {
+ assert_equals(f(), associatedAbcContainer);
+ assert_equals(associatedAbcContainer.contentWindow, null);
+ });
+ setSrc(frame, type, "<span id=abc></span>");
+ });
+ document.body.append(frame);
+ }, `Window's associated Document object is used for finding named objects (<object> with browsing ccontext via ${type} <iframe)>`);
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/w3c-import.log (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/w3c-import.log 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/w3c-import.log 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> The tests in this directory were imported from the W3C repository.
</span><span class="cx"> Do NOT modify these tests directly in WebKit.
</span><span class="cx"> Instead, create a pull request on the WPT github:
</span><del>- https://github.com/w3c/web-platform-tests
</del><ins>+ https://github.com/web-platform-tests/wpt
</ins><span class="cx">
</span><span class="cx"> Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
</span><span class="cx">
</span><span class="lines">@@ -15,5 +15,7 @@
</span><span class="cx"> ------------------------------------------------------------------------
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/named-objects.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/test.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-null-names.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectwindownamedpropertiesexpectedtxtfromrev243633trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindownamedpropertiesexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties-expected.txt (from rev 243633, trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt) (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+
+PASS Static name
+PASS Static id
+FAIL Static name on the prototype assert_equals: expected true but got false
+PASS constructor
+FAIL duplicate property names assert_equals: expected 1 but got 0
+PASS Dynamic name
+PASS Ghost name
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectnamedaccessonthewindowobjectwindownamedpropertieshtmlfromrev243633trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindownamedpropertieshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties.html (from rev 243633, trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties.html) (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/window-named-properties.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+<!doctype html>
+<meta charset=utf-8>
+<title>Changes to named properties of the window object</title>
+<link rel="author" title="Ms2ger" href="ms2ger@gmail.com">
+<link rel="author" title="Boris Zbarsky" href="bzbarsky@mit.edu">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#window">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-nameditem">
+<link rel="help" href="https://heycam.github.io/webidl/#named-properties-object">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id=log></div>
+<iframe name="bar"></iframe>
+<iframe name="baz"></iframe>
+<iframe name="baz"></iframe>
+<iframe name="constructor"></iframe>
+<iframe id="quux"></iframe>
+<script>
+function assert_data_propdesc(pd, Writable, Enumerable, Configurable) {
+ assert_equals(typeof pd, "object");
+ assert_equals(pd.writable, Writable);
+ assert_equals(pd.enumerable, Enumerable);
+ assert_equals(pd.configurable, Configurable);
+}
+test(function() {
+ assert_true("bar" in window, "bar not in window");
+ assert_equals(window["bar"],
+ document.getElementsByTagName("iframe")[0].contentWindow);
+}, "Static name");
+
+test(function() {
+ assert_true("quux" in window, "quux not in window");
+ assert_equals(window["quux"],
+ document.getElementsByTagName("iframe")[4]);
+}, "Static id");
+
+test(function() {
+ assert_true("bar" in Window.prototype, "bar in Window.prototype");
+ assert_false(Window.prototype.hasOwnProperty("bar"), "Window.prototype.hasOwnProperty(\"bar\")");
+
+ var gsp = Object.getPrototypeOf(Object.getPrototypeOf(window));
+ assert_true("bar" in gsp, "bar in gsp");
+ assert_true(gsp.hasOwnProperty("bar"), "gsp.hasOwnProperty(\"bar\")");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(gsp, "bar"),
+ true, false, true);
+}, "Static name on the prototype");
+test(function() {
+ assert_equals(window.constructor, Window);
+ assert_false(window.hasOwnProperty("constructor"), "window.constructor should not be an own property.");
+
+ var proto = Object.getPrototypeOf(window);
+ assert_equals(proto.constructor, Window);
+ assert_true("constructor" in proto, "constructor in proto");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(proto, "constructor"),
+ true, false, true);
+
+ var gsp = Object.getPrototypeOf(proto);
+ assert_true("constructor" in gsp, "constructor in gsp");
+ assert_false(gsp.hasOwnProperty("constructor"), "gsp.hasOwnProperty(\"constructor\")");
+ assert_equals(Object.getOwnPropertyDescriptor(gsp, "constructor"), undefined);
+}, "constructor");
+test(function() {
+ var gsp = Object.getPrototypeOf(Object.getPrototypeOf(window));
+ var names = Object.getOwnPropertyNames(gsp);
+ assert_equals(names.filter((name) => name == "baz").length, 1);
+
+}, "duplicate property names")
+var t = async_test("Dynamic name")
+var t2 = async_test("Ghost name")
+t.step(function() {
+ var iframe = document.getElementsByTagName("iframe")[0];
+ iframe.setAttribute("srcdoc", "<script>window.name='foo'<\/script>");
+ iframe.onload = function() {
+ t.step(function() {
+ assert_true("foo" in window, "foo not in window");
+ assert_equals(window["foo"], iframe.contentWindow);
+ });
+ t.done();
+ t2.step(function() {
+ assert_false("bar" in window, "bar still in window");
+ assert_equals(window["bar"], undefined);
+ });
+ t2.done();
+ };
+});
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindoww3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/w3c-import.log (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/w3c-import.log 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/w3c-import.log 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> The tests in this directory were imported from the W3C repository.
</span><span class="cx"> Do NOT modify these tests directly in WebKit.
</span><span class="cx"> Instead, create a pull request on the WPT github:
</span><del>- https://github.com/w3c/web-platform-tests
</del><ins>+ https://github.com/web-platform-tests/wpt
</ins><span class="cx">
</span><span class="cx"> Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
</span><span class="cx">
</span><span class="lines">@@ -14,4 +14,4 @@
</span><span class="cx"> None
</span><span class="cx"> ------------------------------------------------------------------------
</span><span class="cx"> List of files:
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindowwindowsecurityhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.html (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.html 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,202 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>HTML Test: Window Security</title>
-<link rel="author" title="Intel" href="http://www.intel.com/" />
-<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/browsers.html#the-window-object" />
-<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/timers.html#timers" />
-<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/webappapis.html#atob" />
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowsessionstorage" />
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowlocalstorage" />
-<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/browsers.html#window" />
-<link rel="help" href="http://dev.w3.org/csswg/cssom/#extensions-to-the-window-interface" />
-<link rel="help" href="http://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface" />
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/common/get-host-info.sub.js"></script>
-<div id="log"></div>
-<script>
-var t = async_test("Window Security testing");
-
-function fr_load() {
- fr = document.getElementById("fr");
-
- t.step(function () {
- //SecurityError should be thrown
- [
- //attributes
- {name: "applicationCache"},
- {name: "devicePixelRatio"},
- {name: "document"},
- {name: "external"},
- {name: "frameElement"},
- {name: "history"},
- {name: "innerWidth"},
- {name: "innerHeight"},
- {name: "locationbar"},
- {name: "localStorage"},
- {name: "menubar"},
- {name: "name"},
- {name: "navigator"},
- {name: "onabort"},
- {name: "onafterprint"},
- {name: "onbeforeprint"},
- {name: "onbeforeunload"},
- {name: "onblur"},
- {name: "oncancel"},
- {name: "oncanplay"},
- {name: "oncanplaythrough"},
- {name: "onchange"},
- {name: "onclick"},
- {name: "onclose"},
- {name: "oncontextmenu"},
- {name: "oncuechange"},
- {name: "ondblclick"},
- {name: "ondrag"},
- {name: "ondragend"},
- {name: "ondragenter"},
- {name: "ondragleave"},
- {name: "ondragover"},
- {name: "ondragstart"},
- {name: "ondrop"},
- {name: "ondurationchange"},
- {name: "onemptied"},
- {name: "onended"},
- {name: "onerror"},
- {name: "onfocus"},
- {name: "onhashchange"},
- {name: "oninput"},
- {name: "oninvalid"},
- {name: "onkeydown"},
- {name: "onkeypress"},
- {name: "onkeyup"},
- {name: "onload"},
- {name: "onloadeddata"},
- {name: "onloadedmetadata"},
- {name: "onloadstart"},
- {name: "onmessage"},
- {name: "onmousedown"},
- {name: "onmousemove"},
- {name: "onmouseout"},
- {name: "onmouseover"},
- {name: "onmouseup"},
- {name: "onmousewheel"},
- {name: "onoffline"},
- {name: "ononline"},
- {name: "onpause"},
- {name: "onplay"},
- {name: "onplaying"},
- {name: "onpagehide"},
- {name: "onpageshow"},
- {name: "onpopstate"},
- {name: "onprogress"},
- {name: "onratechange"},
- {name: "onreset"},
- {name: "onresize"},
- {name: "onscroll"},
- {name: "onseeked"},
- {name: "onseeking"},
- {name: "onselect"},
- {name: "onshow"},
- {name: "onstalled"},
- {name: "onstorage"},
- {name: "onsubmit"},
- {name: "onsuspend"},
- {name: "ontimeupdate"},
- {name: "onunload"},
- {name: "onvolumechange"},
- {name: "onwaiting"},
- {name: "pageXOffset"},
- {name: "pageYOffset"},
- {name: "personalbar"},
- {name: "screen"},
- {name: "scrollbars"},
- {name: "statusbar"},
- {name: "status"},
- {name: "screenX"},
- {name: "screenY"},
- {name: "sessionStorage"},
- {name: "toolbar"},
- //methods
- {name: "alert", isMethod: true},
- {name: "clearInterval", isMethod: true, args:[1]},
- {name: "clearTimeout", isMethod: true, args:[function () {}, 1]},
- {name: "confirm", isMethod: true},
- {name: "getComputedStyle", isMethod: true, args:[document.body, null]},
- {name: "getSelection", isMethod: true},
- {name: "matchMedia", isMethod: true, args:["(min-width:50px)"]},
- {name: "moveBy", isMethod: true, args:[10, 10]},
- {name: "moveTo", isMethod: true, args:[10, 10]},
- {name: "open", isMethod: true},
- {name: "print", isMethod: true},
- {name: "prompt", isMethod: true},
- {name: "resizeTo", isMethod: true, args:[10, 10]},
- {name: "resizeBy", isMethod: true, args:[10, 10]},
- {name: "scroll", isMethod: true, args:[10, 10]},
- {name: "scrollTo", isMethod: true, args:[10, 10]},
- {name: "scrollBy", isMethod: true, args:[10, 10]},
- {name: "setInterval", isMethod: true, args:[function () {}, 1]},
- {name: "setTimeout", isMethod: true, args:[function () {}, 1]},
- {name: "stop", isMethod: true},
- ].forEach(function (item) {
- test(function () {
- assert_true(item.name in window, "window." + item.name + " should exist.");
- assert_throws("SecurityError", function () {
- if (item.isMethod)
- if (item.args)
- fr.contentWindow[item.name](item.args[0], item.args[1]);
- else
- fr.contentWindow[item.name]();
- else
- fr.contentWindow[item.name];
- }, "A SecurityError exception should be thrown.");
- }, "A SecurityError exception must be thrown when window." + item.name + " is accessed from a different origin.");
- });
-
- //SecurityError should not be thrown
- [
- //attributes
- {name: "closed"},
- {name: "frames"},
- {name: "length"},
- {name: "location"},
- {name: "opener"},
- {name: "parent"},
- {name: "self"},
- {name: "top"},
- {name: "window"},
- //methods
- {name: "blur", isMethod: true},
- {name: "close", isMethod: true},
- {name: "focus", isMethod: true},
- {name: "postMessage", isMethod: true, args: [{msg: 'foo'}, "*"]}
- ].forEach(function (item) {
- test(function () {
- assert_true(item.name in window, "window." + item.name + " should exist.");
- try {
- if (item.isMethod)
- if (item.args)
- fr.contentWindow[item.name](item.args[0], item.args[1]);
- else
- fr.contentWindow[item.name]();
- else
- fr.contentWindow[item.name];
- } catch (e) {
- assert_unreached("An unexpected exception was thrown.");
- }
- }, "A SecurityError exception should not be thrown when window." + item.name + " is accessed from a different origin.");
- });
- });
- t.done();
-}
-
-</script>
-<script>
-onload = function() {
- var frame = document.createElement('iframe');
- frame.id = "fr";
- frame.setAttribute("style", "display:none");
- frame.setAttribute('src', get_host_info().HTTP_REMOTE_ORIGIN + "/");
- frame.setAttribute("onload", "fr_load()");
- document.body.appendChild(frame);
-}
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindowwindowsecurityhttpsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,127 @@
</span><ins>+
+PASS Window Security testing
+PASS A SecurityError exception must be thrown when window.applicationCache is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.devicePixelRatio is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.document is accessed from a different origin.
+FAIL A SecurityError exception must be thrown when window.external is accessed from a different origin. assert_true: window.external should exist. expected true got false
+PASS A SecurityError exception must be thrown when window.frameElement is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.history is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.innerWidth is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.innerHeight is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.locationbar is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.localStorage is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.menubar is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.name is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.navigator is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onabort is accessed from a different origin.
+FAIL A SecurityError exception must be thrown when window.onafterprint is accessed from a different origin. assert_true: window.onafterprint should exist. expected true got false
+FAIL A SecurityError exception must be thrown when window.onbeforeprint is accessed from a different origin. assert_true: window.onbeforeprint should exist. expected true got false
+PASS A SecurityError exception must be thrown when window.onbeforeunload is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onblur is accessed from a different origin.
+FAIL A SecurityError exception must be thrown when window.oncancel is accessed from a different origin. assert_true: window.oncancel should exist. expected true got false
+PASS A SecurityError exception must be thrown when window.oncanplay is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.oncanplaythrough is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onchange is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onclick is accessed from a different origin.
+FAIL A SecurityError exception must be thrown when window.onclose is accessed from a different origin. assert_true: window.onclose should exist. expected true got false
+PASS A SecurityError exception must be thrown when window.oncontextmenu is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.oncuechange is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondblclick is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondrag is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondragend is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondragenter is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondragleave is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondragover is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondragstart is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondrop is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ondurationchange is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onemptied is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onended is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onerror is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onfocus is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onhashchange is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.oninput is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.oninvalid is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onkeydown is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onkeypress is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onkeyup is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onload is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onloadeddata is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onloadedmetadata is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onloadstart is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onmessage is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onmousedown is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onmousemove is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onmouseout is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onmouseover is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onmouseup is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onmousewheel is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onoffline is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ononline is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onpause is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onplay is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onplaying is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onpagehide is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onpageshow is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onpopstate is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onprogress is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onratechange is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onreset is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onresize is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onscroll is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onseeked is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onseeking is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onselect is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onstalled is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onstorage is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onsubmit is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onsuspend is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.ontimeupdate is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onunload is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onvolumechange is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.onwaiting is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.pageXOffset is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.pageYOffset is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.personalbar is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.screen is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.scrollbars is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.statusbar is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.status is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.screenX is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.screenY is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.sessionStorage is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.toolbar is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.alert is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.clearInterval is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.clearTimeout is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.confirm is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.getComputedStyle is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.getSelection is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.matchMedia is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.moveBy is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.moveTo is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.open is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.print is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.prompt is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.resizeTo is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.resizeBy is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.scroll is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.scrollTo is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.scrollBy is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.setInterval is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.setTimeout is accessed from a different origin.
+PASS A SecurityError exception must be thrown when window.stop is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.closed is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.frames is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.length is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.location is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.opener is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.parent is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.self is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.top is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.window is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.blur is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.close is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.focus is accessed from a different origin.
+PASS A SecurityError exception should not be thrown when window.postMessage is accessed from a different origin.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindowwindowsecurityhttpshtmlfromrev243633trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectsecuritywindowwindowsecurityhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https.html (from rev 243633, trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.html) (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,201 @@
</span><ins>+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: Window Security</title>
+<link rel="author" title="Intel" href="http://www.intel.com/" />
+<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/browsers.html#the-window-object" />
+<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/timers.html#timers" />
+<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/webappapis.html#atob" />
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowsessionstorage" />
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowlocalstorage" />
+<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/browsers.html#window" />
+<link rel="help" href="http://dev.w3.org/csswg/cssom/#extensions-to-the-window-interface" />
+<link rel="help" href="http://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface" />
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+<div id="log"></div>
+<script>
+var t = async_test("Window Security testing");
+
+function fr_load() {
+ fr = document.getElementById("fr");
+
+ t.step(function () {
+ //SecurityError should be thrown
+ [
+ //attributes
+ {name: "applicationCache"},
+ {name: "devicePixelRatio"},
+ {name: "document"},
+ {name: "external"},
+ {name: "frameElement"},
+ {name: "history"},
+ {name: "innerWidth"},
+ {name: "innerHeight"},
+ {name: "locationbar"},
+ {name: "localStorage"},
+ {name: "menubar"},
+ {name: "name"},
+ {name: "navigator"},
+ {name: "onabort"},
+ {name: "onafterprint"},
+ {name: "onbeforeprint"},
+ {name: "onbeforeunload"},
+ {name: "onblur"},
+ {name: "oncancel"},
+ {name: "oncanplay"},
+ {name: "oncanplaythrough"},
+ {name: "onchange"},
+ {name: "onclick"},
+ {name: "onclose"},
+ {name: "oncontextmenu"},
+ {name: "oncuechange"},
+ {name: "ondblclick"},
+ {name: "ondrag"},
+ {name: "ondragend"},
+ {name: "ondragenter"},
+ {name: "ondragleave"},
+ {name: "ondragover"},
+ {name: "ondragstart"},
+ {name: "ondrop"},
+ {name: "ondurationchange"},
+ {name: "onemptied"},
+ {name: "onended"},
+ {name: "onerror"},
+ {name: "onfocus"},
+ {name: "onhashchange"},
+ {name: "oninput"},
+ {name: "oninvalid"},
+ {name: "onkeydown"},
+ {name: "onkeypress"},
+ {name: "onkeyup"},
+ {name: "onload"},
+ {name: "onloadeddata"},
+ {name: "onloadedmetadata"},
+ {name: "onloadstart"},
+ {name: "onmessage"},
+ {name: "onmousedown"},
+ {name: "onmousemove"},
+ {name: "onmouseout"},
+ {name: "onmouseover"},
+ {name: "onmouseup"},
+ {name: "onmousewheel"},
+ {name: "onoffline"},
+ {name: "ononline"},
+ {name: "onpause"},
+ {name: "onplay"},
+ {name: "onplaying"},
+ {name: "onpagehide"},
+ {name: "onpageshow"},
+ {name: "onpopstate"},
+ {name: "onprogress"},
+ {name: "onratechange"},
+ {name: "onreset"},
+ {name: "onresize"},
+ {name: "onscroll"},
+ {name: "onseeked"},
+ {name: "onseeking"},
+ {name: "onselect"},
+ {name: "onstalled"},
+ {name: "onstorage"},
+ {name: "onsubmit"},
+ {name: "onsuspend"},
+ {name: "ontimeupdate"},
+ {name: "onunload"},
+ {name: "onvolumechange"},
+ {name: "onwaiting"},
+ {name: "pageXOffset"},
+ {name: "pageYOffset"},
+ {name: "personalbar"},
+ {name: "screen"},
+ {name: "scrollbars"},
+ {name: "statusbar"},
+ {name: "status"},
+ {name: "screenX"},
+ {name: "screenY"},
+ {name: "sessionStorage"},
+ {name: "toolbar"},
+ //methods
+ {name: "alert", isMethod: true},
+ {name: "clearInterval", isMethod: true, args:[1]},
+ {name: "clearTimeout", isMethod: true, args:[function () {}, 1]},
+ {name: "confirm", isMethod: true},
+ {name: "getComputedStyle", isMethod: true, args:[document.body, null]},
+ {name: "getSelection", isMethod: true},
+ {name: "matchMedia", isMethod: true, args:["(min-width:50px)"]},
+ {name: "moveBy", isMethod: true, args:[10, 10]},
+ {name: "moveTo", isMethod: true, args:[10, 10]},
+ {name: "open", isMethod: true},
+ {name: "print", isMethod: true},
+ {name: "prompt", isMethod: true},
+ {name: "resizeTo", isMethod: true, args:[10, 10]},
+ {name: "resizeBy", isMethod: true, args:[10, 10]},
+ {name: "scroll", isMethod: true, args:[10, 10]},
+ {name: "scrollTo", isMethod: true, args:[10, 10]},
+ {name: "scrollBy", isMethod: true, args:[10, 10]},
+ {name: "setInterval", isMethod: true, args:[function () {}, 1]},
+ {name: "setTimeout", isMethod: true, args:[function () {}, 1]},
+ {name: "stop", isMethod: true},
+ ].forEach(function (item) {
+ test(function () {
+ assert_true(item.name in window, "window." + item.name + " should exist.");
+ assert_throws("SecurityError", function () {
+ if (item.isMethod)
+ if (item.args)
+ fr.contentWindow[item.name](item.args[0], item.args[1]);
+ else
+ fr.contentWindow[item.name]();
+ else
+ fr.contentWindow[item.name];
+ }, "A SecurityError exception should be thrown.");
+ }, "A SecurityError exception must be thrown when window." + item.name + " is accessed from a different origin.");
+ });
+
+ //SecurityError should not be thrown
+ [
+ //attributes
+ {name: "closed"},
+ {name: "frames"},
+ {name: "length"},
+ {name: "location"},
+ {name: "opener"},
+ {name: "parent"},
+ {name: "self"},
+ {name: "top"},
+ {name: "window"},
+ //methods
+ {name: "blur", isMethod: true},
+ {name: "close", isMethod: true},
+ {name: "focus", isMethod: true},
+ {name: "postMessage", isMethod: true, args: [{msg: 'foo'}, "*"]}
+ ].forEach(function (item) {
+ test(function () {
+ assert_true(item.name in window, "window." + item.name + " should exist.");
+ try {
+ if (item.isMethod)
+ if (item.args)
+ fr.contentWindow[item.name](item.args[0], item.args[1]);
+ else
+ fr.contentWindow[item.name]();
+ else
+ fr.contentWindow[item.name];
+ } catch (e) {
+ assert_unreached("An unexpected exception was thrown.");
+ }
+ }, "A SecurityError exception should not be thrown when window." + item.name + " is accessed from a different origin.");
+ });
+ });
+ t.done();
+}
+
+</script>
+<script>
+onload = function() {
+ var frame = document.createElement('iframe');
+ frame.id = "fr";
+ frame.setAttribute("style", "display:none");
+ frame.setAttribute('src', get_host_info().HTTPS_REMOTE_ORIGIN + "/");
+ frame.setAttribute("onload", "fr_load()");
+ document.body.appendChild(frame);
+}
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectselfetalwindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+FAIL iframeWindow.frames before and after removal assert_equals: frames got cleared after browsing context removal expected object "[object Window]" but got null
+FAIL popupWindow.frames before, after closing, and after discarding assert_true: expected true got false
+PASS iframeWindow.globalThis before and after removal
+FAIL popupWindow.globalThis before, after closing, and after discarding assert_true: expected true got false
+FAIL iframeWindow.self before and after removal assert_equals: self got cleared after browsing context removal expected object "[object Window]" but got null
+FAIL popupWindow.self before, after closing, and after discarding assert_true: expected true got false
+FAIL iframeWindow.window before and after removal assert_equals: window got cleared after browsing context removal expected object "[object Window]" but got null
+FAIL popupWindow.window before, after closing, and after discarding assert_true: expected true got false
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectselfetalwindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectselfetalwindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.js (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.js 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+function delayed_assert_done(t, w, windowProxySelfReference) {
+ // Let's make sure nobody is being sneaky
+ t.step_timeout(() => {
+ t.step_timeout(() => {
+ assert_equals(w[windowProxySelfReference], w, `${windowProxySelfReference} got cleared after some time`);
+ t.done();
+ }, 0);
+ }, 0);
+}
+
+[
+ "frames",
+ "globalThis",
+ "self",
+ "window"
+].forEach(windowProxySelfReference => {
+ async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe")),
+ otherW = frame.contentWindow;
+ assert_equals(otherW[windowProxySelfReference], otherW, `${windowProxySelfReference} is broken`);
+ frame.remove();
+ assert_equals(otherW[windowProxySelfReference], otherW, `${windowProxySelfReference} got cleared after browsing context removal`);
+ assert_true(otherW.closed);
+
+ delayed_assert_done(t, otherW, windowProxySelfReference);
+ }, `iframeWindow.${windowProxySelfReference} before and after removal`);
+
+ async_test(t => {
+ const otherW = window.open();
+ assert_equals(otherW[windowProxySelfReference], otherW, `${windowProxySelfReference} is broken`);
+ otherW.onunload = t.step_func(() => {
+ assert_equals(otherW[windowProxySelfReference], otherW, `${windowProxySelfReference} got cleared after browsing context unload`);
+ t.step_timeout(() => {
+ assert_equals(otherW.opener, null); // Ensure browsing context is discarded
+ assert_equals(otherW[windowProxySelfReference], otherW, `${windowProxySelfReference} got cleared after browsing context removal`);
+ delayed_assert_done(t, otherW, windowProxySelfReference);
+ }, 0);
+ });
+ otherW.close();
+ assert_equals(otherW[windowProxySelfReference], otherW, `${windowProxySelfReference} got cleared after browsing context closure`);
+ assert_true(otherW.closed);
+ }, `popupWindow.${windowProxySelfReference} before, after closing, and after discarding`)
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/w3c-import.log (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/w3c-import.log 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/w3c-import.log 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> The tests in this directory were imported from the W3C repository.
</span><span class="cx"> Do NOT modify these tests directly in WebKit.
</span><span class="cx"> Instead, create a pull request on the WPT github:
</span><del>- https://github.com/w3c/web-platform-tests
</del><ins>+ https://github.com/web-platform-tests/wpt
</ins><span class="cx">
</span><span class="cx"> Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
</span><span class="cx">
</span><span class="lines">@@ -14,13 +14,21 @@
</span><span class="cx"> None
</span><span class="cx"> ------------------------------------------------------------------------
</span><span class="cx"> List of files:
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/Document-defaultView.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/Window-document.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window.js
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window.js
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/document-attribute.window.js
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/focus.window.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/historical.window.js
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/length-attribute.window.js
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/name-attribute.window.js
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-aliases.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties-strict.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties.html
</del><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer.html
+/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-prototype-chain.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindownamedpropertiesexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,8 +0,0 @@
</span><del>-
-PASS Static name
-FAIL Static name on the prototype assert_equals: expected true but got false
-PASS constructor
-FAIL duplicate property names assert_equals: expected 1 but got 0
-PASS Dynamic name
-PASS Ghost name
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindownamedpropertieshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties.html (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties.html 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-named-properties.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,77 +0,0 @@
</span><del>-<!doctype html>
-<meta charset=utf-8>
-<title>Changes to named properties of the window object</title>
-<link rel="author" title="Ms2ger" href="ms2ger@gmail.com">
-<link rel="author" title="Boris Zbarsky" href="bzbarsky@mit.edu">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#window">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-nameditem">
-<link rel="help" href="https://heycam.github.io/webidl/#named-properties-object">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id=log></div>
-<iframe name="bar"></iframe>
-<iframe name="baz"></iframe>
-<iframe name="baz"></iframe>
-<iframe name="constructor"></iframe>
-<script>
-function assert_data_propdesc(pd, Writable, Enumerable, Configurable) {
- assert_equals(typeof pd, "object");
- assert_equals(pd.writable, Writable);
- assert_equals(pd.enumerable, Enumerable);
- assert_equals(pd.configurable, Configurable);
-}
-test(function() {
- assert_true("bar" in window, "bar not in window");
- assert_equals(window["bar"],
- document.getElementsByTagName("iframe")[0].contentWindow);
-}, "Static name");
-test(function() {
- assert_true("bar" in Window.prototype, "bar in Window.prototype");
- assert_false(Window.prototype.hasOwnProperty("bar"), "Window.prototype.hasOwnProperty(\"bar\")");
-
- var gsp = Object.getPrototypeOf(Object.getPrototypeOf(window));
- assert_true("bar" in gsp, "bar in gsp");
- assert_true(gsp.hasOwnProperty("bar"), "gsp.hasOwnProperty(\"bar\")");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(gsp, "bar"),
- true, false, true);
-}, "Static name on the prototype");
-test(function() {
- assert_equals(window.constructor, Window);
- assert_false(window.hasOwnProperty("constructor"), "window.constructor should not be an own property.");
-
- var proto = Object.getPrototypeOf(window);
- assert_equals(proto.constructor, Window);
- assert_true("constructor" in proto, "constructor in proto");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(proto, "constructor"),
- true, false, true);
-
- var gsp = Object.getPrototypeOf(proto);
- assert_true("constructor" in gsp, "constructor in gsp");
- assert_false(gsp.hasOwnProperty("constructor"), "gsp.hasOwnProperty(\"constructor\")");
- assert_equals(Object.getOwnPropertyDescriptor(gsp, "constructor"), undefined);
-}, "constructor");
-test(function() {
- var gsp = Object.getPrototypeOf(Object.getPrototypeOf(window));
- var names = Object.getOwnPropertyNames(gsp);
- assert_equals(names.filter((name) => name == "baz").length, 1);
-
-}, "duplicate property names")
-var t = async_test("Dynamic name")
-var t2 = async_test("Ghost name")
-t.step(function() {
- var iframe = document.getElementsByTagName("iframe")[0];
- iframe.setAttribute("srcdoc", "<script>window.name='foo'<\/script>");
- iframe.onload = function() {
- t.step(function() {
- assert_true("foo" in window, "foo not in window");
- assert_equals(window["foo"], iframe.contentWindow);
- });
- t.done();
- t2.step(function() {
- assert_false("bar" in window, "bar still in window");
- assert_equals(window["bar"], undefined);
- });
- t2.done();
- };
-});
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowopennoopenerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener-expected.txt (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener-expected.txt 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,17 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 1: TypeError: this.checkValues is not a function. (In 'this.checkValues(w2)', 'this.checkValues' is undefined)
-CONSOLE MESSAGE: line 1: TypeError: this.checkValues is not a function. (In 'this.checkValues(w2)', 'this.checkValues' is undefined)
-CONSOLE MESSAGE: line 1: TypeError: this.checkValues is not a function. (In 'this.checkValues(w2)', 'this.checkValues' is undefined)
</del><ins>+CONSOLE MESSAGE: line 117: testError: special target must be one of: _self, _parent, _top
</ins><span class="cx">
</span><del>-Harness Error (FAIL), message = Test named 'window.open() with 'noopener' should not reuse existing target' specified 1 'cleanup' function, and 1 failed.
</del><ins>+FAIL window.open() with "noopener" tests testError: special target must be one of: _self, _parent, _top
</ins><span class="cx">
</span><del>-FAIL window.open() with 'noopener' should not reuse existing target Can't find variable: BroadcastChannel
-NOTRUN noopener needs to be present as a token on its own
-NOTRUN noopener needs to be present as a token on its own again
-NOTRUN noopener needs to be present as a token on its own yet again
-NOTRUN Trailing noopener should work
-NOTRUN Leading noopener should work
-NOTRUN Interior noopener should work
-NOTRUN noopener window.open targeting _self
-NOTRUN noopener window.open targeting _parent
-NOTRUN noopener window.open targeting _top
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowopennoopenerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener.html (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener.html 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,6 +1,13 @@
</span><span class="cx"> <!doctype html>
</span><span class="cx"> <meta charset=utf-8>
</span><span class="cx"> <title>window.open() with "noopener" tests</title>
</span><ins>+
+<meta name="variant" content="?indexed">
+<meta name="variant" content="?_self">
+<meta name="variant" content="?_parent">
+<meta name="variant" content="?_top">
+<meta name=timeout content=long>
+
</ins><span class="cx"> <script src=/resources/testharness.js></script>
</span><span class="cx"> <script src=/resources/testharnessreport.js></script>
</span><span class="cx"> <script>
</span><span class="lines">@@ -8,13 +15,13 @@
</span><span class="cx"> { testDescription: "window.open() with 'noopener' should not reuse existing target",
</span><span class="cx"> secondWindowFeatureString: "noopener",
</span><span class="cx"> shouldReuse: false },
</span><del>- { testDescription: "noopener needs to be present as a token on its own",
</del><ins>+ { testDescription: "noopener=1 means the same as noopener",
</ins><span class="cx"> secondWindowFeatureString: "noopener=1",
</span><del>- shouldReuse: true },
- { testDescription: "noopener needs to be present as a token on its own again",
</del><ins>+ shouldReuse: false },
+ { testDescription: "noopener=0 means lack of noopener",
</ins><span class="cx"> secondWindowFeatureString: "noopener=0",
</span><span class="cx"> shouldReuse: true },
</span><del>- { testDescription: "noopener needs to be present as a token on its own yet again",
</del><ins>+ { testDescription: "noopener needs to be present as a token on its own",
</ins><span class="cx"> secondWindowFeatureString: "make me noopener",
</span><span class="cx"> shouldReuse: true },
</span><span class="cx"> { testDescription: "Trailing noopener should work",
</span><span class="lines">@@ -28,7 +35,6 @@
</span><span class="cx"> shouldReuse: false },
</span><span class="cx"> ];
</span><span class="cx">
</span><del>-var tests = [];
</del><span class="cx"> /**
</span><span class="cx"> * Loop over our testData array and kick off an async test for each entry. Each
</span><span class="cx"> * async test opens a window using window.open() with some per-test unique name,
</span><span class="lines">@@ -39,56 +45,59 @@
</span><span class="cx"> * cases and non-null in the cases when the existing window gets reused) and so
</span><span class="cx"> * forth.
</span><span class="cx"> */
</span><del>-for (var i = 0; i < testData.length; ++i) {
- var test = testData[i];
- var t = async_test(test.testDescription);
- tests.push(t);
- t.secondWindowFeatureString = test.secondWindowFeatureString;
- t.windowName = "someuniquename" + i;
</del><ins>+function indexedTests() {
+ var tests = [];
+ for(var i = 0; i < testData.length; ++i) {
+ var test = testData[i];
+ var t = async_test(test.testDescription);
+ tests.push(t);
+ t.secondWindowFeatureString = test.secondWindowFeatureString;
+ t.windowName = "someuniquename" + i;
</ins><span class="cx">
</span><del>- if (test.shouldReuse) {
- t.step(function() {
- var windowName = this.windowName;
</del><ins>+ if (test.shouldReuse) {
+ t.step(function() {
+ var windowName = this.windowName;
</ins><span class="cx">
</span><del>- var w1 = window.open("", windowName);
- this.add_cleanup(function() { w1.close(); });
</del><ins>+ var w1 = window.open("", windowName);
+ this.add_cleanup(function() { w1.close(); });
</ins><span class="cx">
</span><del>- assert_equals(w1.opener, window);
</del><ins>+ assert_equals(w1.opener, window);
</ins><span class="cx">
</span><del>- var w2 = window.open("", windowName, this.secondWindowFeatureString);
- assert_equals(w2, w1);
- assert_equals(w2.opener, w1.opener);
- assert_equals(w2.opener, window);
- this.done();
- });
- } else {
- t.step(function() {
- var w1;
- this.add_cleanup(function() {
- w1.close();
- channel.postMessage(null);
</del><ins>+ var w2 = window.open("", windowName, this.secondWindowFeatureString);
+ assert_equals(w2, w1);
+ assert_equals(w2.opener, w1.opener);
+ assert_equals(w2.opener, window);
+ this.done();
</ins><span class="cx"> });
</span><ins>+ } else {
+ t.step(function() {
+ var w1;
+ this.add_cleanup(function() {
+ w1.close();
+ channel.postMessage(null);
+ });
</ins><span class="cx">
</span><del>- var windowName = this.windowName;
- var channel = new BroadcastChannel(windowName);
</del><ins>+ var windowName = this.windowName;
+ var channel = new BroadcastChannel(windowName);
</ins><span class="cx">
</span><del>- channel.onmessage = this.step_func_done(function(e) {
- var data = e.data;
- assert_equals(data.name, windowName, "Should have the right name");
- assert_equals(data.haveOpener, false, "Should not have opener");
</del><ins>+ channel.onmessage = this.step_func_done(function(e) {
+ var data = e.data;
+ assert_equals(data.name, windowName, "Should have the right name");
+ assert_equals(data.haveOpener, false, "Should not have opener");
+ assert_equals(w1.opener, window);
+ assert_equals(w1.location.href, "about:blank");
+ });
+
+ w1 = window.open("", windowName);
</ins><span class="cx"> assert_equals(w1.opener, window);
</span><del>- assert_equals(w1.location.href, "about:blank");
- });
</del><span class="cx">
</span><del>- w1 = window.open("", windowName);
- assert_equals(w1.opener, window);
</del><ins>+ var w2 = window.open("support/noopener-target.html?" + windowName,
+ windowName, this.secondWindowFeatureString);
+ assert_equals(w2, null);
</ins><span class="cx">
</span><del>- var w2 = window.open("support/noopener-target.html?" + windowName,
- windowName, this.secondWindowFeatureString);
- assert_equals(w2, null);
-
- assert_equals(w1.opener, window);
- });
</del><ins>+ assert_equals(w1.opener, window);
+ });
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -96,13 +105,27 @@
</span><span class="cx"> * Loop over the special targets that ignore noopener and check that doing a
</span><span class="cx"> * window.open() with those targets correctly reuses the existing window.
</span><span class="cx"> */
</span><del>-for (var target of ["_self", "_parent", "_top"]) {
- var t = async_test("noopener window.open targeting " + target);
- tests.push(t);
- t.openedWindow = window.open(`javascript:var w2 = window.open("", "${target}", "noopener"); this.checkValues(w2); this.close(); void(0);`);
- assert_equals(t.openedWindow.opener, window);
- t.openedWindow.checkValues = t.step_func_done(function(win) {
- assert_equals(win, this.openedWindow);
- });
</del><ins>+function specialTargetTest(target) {
+ if (["_self", "_parent", "_top"].includes(target)) {
+ var t = async_test("noopener window.open targeting " + target);
+ t.openedWindow = window.open(`javascript:var w2 = window.open("", "${target}", "noopener"); this.checkValues(w2); this.close(); void(0);`);
+ assert_equals(t.openedWindow.opener, window);
+ t.openedWindow.checkValues = t.step_func_done(function(win) {
+ assert_equals(win, this.openedWindow);
+ });
+ } else {
+ throw 'testError: special target must be one of: _self, _parent, _top'
+ }
</ins><span class="cx"> }
</span><ins>+
+/**
+ * Parse the Query string, check if it matches keyword 'indexed' to run the indexed tests,
+ * otherwise test it as a special target
+ */
+var variant = window.location.href.split("?")[1]
+if(variant == "indexed") {
+ indexedTests();
+} else {
+ specialTargetTest(variant);
+}
</ins><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowopennoreferrerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL window.open() with "noreferrer" tests Can't find variable: BroadcastChannel
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowopennoreferrerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer.html (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+<!doctype html>
+<meta charset=utf-8>
+<title>window.open() with "noreferrer" tests</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+async_test(t => {
+ const channelName = "343243423432",
+ channel = new BroadcastChannel(channelName);
+ window.open("support/noreferrer-target.html?" + channelName, "", "noreferrer");
+ channel.onmessage = t.step_func_done(e => {
+ // Send message first so if asserts throw the popup is still closed
+ channel.postMessage(null);
+
+ assert_equals(e.data.name, "");
+ assert_equals(e.data.referrer, "");
+ assert_equals(e.data.haveOpener, false);
+ });
+});
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertieshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.html (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.html 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1,315 +0,0 @@
</span><del>-<!doctype html>
-<meta charset=utf-8>
-<title>Properties of the window object</title>
-<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com">
-<link rel="help" href="http://ecma-international.org/ecma-262/5.1/#sec-15.1">
-<link rel="help" href="https://heycam.github.io/webidl/#interface-prototype-object">
-<link rel="help" href="https://heycam.github.io/webidl/#es-attributes">
-<link rel="help" href="https://heycam.github.io/webidl/#es-operations">
-<link rel="help" href="https://dom.spec.whatwg.org/#eventtarget">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#window">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowtimers">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowbase64">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowsessionstorage">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowlocalstorage">
-<link rel="help" href="https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#dom-window-getselection">
-<link rel="help" href="http://dev.w3.org/csswg/cssom/#widl-def-Window">
-<link rel="help" href="http://dev.w3.org/csswg/cssom-view/#widl-def-Window">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id=log></div>
-<script>
-function assert_data_propdesc(pd, Writable, Enumerable, Configurable) {
- assert_equals(typeof pd, "object");
- assert_equals(pd.writable, Writable);
- assert_equals(pd.enumerable, Enumerable);
- assert_equals(pd.configurable, Configurable);
-}
-function assert_accessor_propdesc(pd, hasSetter, Enumerable, Configurable) {
- assert_equals(typeof pd, "object");
- assert_equals(typeof pd.get, "function");
- assert_true("set" in pd,
- "Should always have a setter property on the property descriptor");
- assert_equals(typeof pd.set, hasSetter ? "function" : "undefined");
- assert_equals(pd.enumerable, Enumerable);
- assert_equals(pd.configurable, Configurable);
-}
-
-var unforgeableAttributes = [
- "window",
- "document",
- "location",
- "top"
-];
-
-var replaceableAttributes = [
- "self",
- "locationbar",
- "menubar",
- "personalbar",
- "scrollbars",
- "statusbar",
- "toolbar",
- "frames",
- "parent",
- "external",
- "length",
-
- // CSSOM-View
- "screen",
- "scrollX",
- "scrollY",
- "pageXOffset",
- "pageYOffset",
- "innerWidth",
- "innerHeight",
- "screenX",
- "screenY",
- "outerWidth",
- "outerHeight",
- "devicePixelRatio",
-];
-
-var methods = [
- "close",
- "stop",
- "focus",
- "blur",
- "open",
- "alert",
- "confirm",
- "prompt",
- "print",
- "postMessage",
-
- // WindowBase64
- "btoa",
- "atob",
-
- // WindowTimers
- "setTimeout",
- "clearTimeout",
- "setInterval",
- "clearInterval",
-
- // HTML Editing APIs
- "getSelection",
-
- // CSSOM
- "getComputedStyle",
-
- // CSSOM-View
- "matchMedia",
- "scroll",
- "scrollTo",
- "scrollBy"
-];
-
-var readonlyAttributes = [
- "history",
- "frameElement",
- "navigator",
- "applicationCache",
-
- // WindowSessionStorage
- "sessionStorage",
-
- // WindowLocalStorage
- "localStorage",
-];
-
-var writableAttributes = [
- "name",
- "status",
- "opener",
- "onabort",
- "onafterprint",
- "onbeforeprint",
- "onbeforeunload",
- "onblur",
- "oncancel",
- "oncanplay",
- "oncanplaythrough",
- "onchange",
- "onclick",
- "onclose",
- "oncontextmenu",
- "oncuechange",
- "ondblclick",
- "ondrag",
- "ondragend",
- "ondragenter",
- "ondragleave",
- "ondragover",
- "ondragstart",
- "ondrop",
- "ondurationchange",
- "onemptied",
- "onended",
- "onerror",
- "onfocus",
- "onhashchange",
- "oninput",
- "oninvalid",
- "onkeydown",
- "onkeypress",
- "onkeyup",
- "onload",
- "onloadeddata",
- "onloadedmetadata",
- "onloadstart",
- "onmessage",
- "onmousedown",
- "onmousemove",
- "onmouseout",
- "onmouseover",
- "onmouseup",
- "onmousewheel",
- "onoffline",
- "ononline",
- "onpause",
- "onplay",
- "onplaying",
- "onpagehide",
- "onpageshow",
- "onpopstate",
- "onprogress",
- "onratechange",
- "onreset",
- "onresize",
- "onscroll",
- "onseeked",
- "onseeking",
- "onselect",
- "onshow",
- "onstalled",
- "onstorage",
- "onsubmit",
- "onsuspend",
- "ontimeupdate",
- "onunload",
- "onvolumechange",
- "onwaiting"
-];
-
-test(function() {
- // 15.1.1 Value Properties of the Global Object
- ["NaN", "Infinity", "undefined"].forEach(function(id) {
- test(function() {
- assert_true(id in window, id + " in window");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
- false, false, false);
- }, "Value Property: " + id);
- });
-}, "Value Properties of the Global Object");
-test(function() {
- // 15.1.2 Function Properties of the Global Object
- ["eval", "parseInt", "parseFloat", "isNaN", "isFinite"].forEach(function(id) {
- test(function() {
- assert_true(id in window, id + " in window");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
- true, false, true);
- }, "Function Property: " + id);
- });
-}, "Function Properties of the Global Object");
-test(function() {
- // 15.1.3 URI Handling Function Properties
- ["decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent"].forEach(function(id) {
- test(function() {
- assert_true(id in window, id + " in window");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
- true, false, true);
- }, "URI Handling Function Property: " + id);
- });
-}, "URI Handling Function Properties");
-test(function() {
- // 15.1.4 Constructor Properties of the Global Object
- ["Object", "Function", "Array", "String", "Boolean", "Number", "Date",
- "RegExp", "Error", "EvalError", "RangeError", "ReferenceError",
- "SyntaxError", "TypeError", "URIError"].forEach(function(id) {
- test(function() {
- assert_true(id in window, id + " in window");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
- true, false, true);
- }, "Constructor Property: " + id);
- });
-}, "Constructor Properties of the Global Object");
-test(function() {
- // 15.1.5 Other Properties of the Global Object
- ["Math", "JSON"].forEach(function(id) {
- test(function() {
- assert_true(id in window, id + " in window");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
- true, false, true);
- }, "Other Property: " + id);
- });
-}, "Other Properties of the Global Object");
-test(function() {
- // EventTarget interface
- ["addEventListener", "removeEventListener", "dispatchEvent"].forEach(function(id) {
- test(function() {
- var EventTargetProto = EventTarget.prototype;
- assert_true(id in window, id + " in window");
- assert_equals(window[id], EventTargetProto[id]);
- assert_data_propdesc(Object.getOwnPropertyDescriptor(EventTargetProto, id),
- true, true, true);
- assert_equals(Object.getOwnPropertyDescriptor(window, id), undefined);
- }, "EventTarget method: " + id);
- });
-}, "EventTarget interface");
-test(function() {
- // Window interface
- methods.forEach(function(id) {
- test(function() {
- var WindowProto = Window.prototype;
- assert_true(id in window, id + " in window");
- assert_false(id in WindowProto, id + " in Window.prototype");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
- true, true, true);
- }, "Window method: " + id);
- });
- readonlyAttributes.forEach(function(id) {
- test(function() {
- var WindowProto = Window.prototype;
- assert_true(id in window, id + " in window");
- assert_false(id in WindowProto, id + " in Window.prototype");
- assert_accessor_propdesc(Object.getOwnPropertyDescriptor(window, id),
- false, true, true);
- }, "Window readonly attribute: " + id);
- });
- writableAttributes.forEach(function(id) {
- test(function() {
- var WindowProto = Window.prototype;
- assert_true(id in window, id + " in window");
- assert_false(id in WindowProto, id + " in Window.prototype");
- assert_accessor_propdesc(Object.getOwnPropertyDescriptor(window, id),
- true, true, true);
- }, "Window attribute: " + id);
- });
- unforgeableAttributes.forEach(function(id) {
- test(function() {
- var WindowProto = Window.prototype;
- assert_true(id in window, id + " in window");
- assert_false(id in WindowProto, id + " in Window.prototype");
- // location has a [PutForwards] extended attribute.
- assert_accessor_propdesc(Object.getOwnPropertyDescriptor(window, id),
- id === "location", true, false);
- }, "Window unforgeable attribute: " + id);
- });
- replaceableAttributes.forEach(function(id) {
- test(function() {
- var WindowProto = Window.prototype;
- assert_true(id in window, id + " in window");
- assert_false(id in WindowProto, id + " in Window.prototype");
- assert_accessor_propdesc(Object.getOwnPropertyDescriptor(window, id),
- true, true, true);
- }, "Window replaceable attribute: " + id);
- });
-}, "Window interface");
-test(function() {
- assert_equals(window.constructor, Window);
- assert_false(window.hasOwnProperty("constructor"), "window.constructor should not be an own property.");
- assert_data_propdesc(Object.getOwnPropertyDescriptor(Window.prototype, "constructor"),
- true, false, true);
-}, "constructor");
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertieshttpsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,176 @@
</span><ins>+
+PASS Value Properties of the Global Object
+PASS Value Property: NaN
+PASS Value Property: Infinity
+PASS Value Property: undefined
+PASS Function Properties of the Global Object
+PASS Function Property: eval
+PASS Function Property: parseInt
+PASS Function Property: parseFloat
+PASS Function Property: isNaN
+PASS Function Property: isFinite
+PASS URI Handling Function Properties
+PASS URI Handling Function Property: decodeURI
+PASS URI Handling Function Property: decodeURIComponent
+PASS URI Handling Function Property: encodeURI
+PASS URI Handling Function Property: encodeURIComponent
+PASS Constructor Properties of the Global Object
+PASS Constructor Property: Object
+PASS Constructor Property: Function
+PASS Constructor Property: Array
+PASS Constructor Property: String
+PASS Constructor Property: Boolean
+PASS Constructor Property: Number
+PASS Constructor Property: Date
+PASS Constructor Property: RegExp
+PASS Constructor Property: Error
+PASS Constructor Property: EvalError
+PASS Constructor Property: RangeError
+PASS Constructor Property: ReferenceError
+PASS Constructor Property: SyntaxError
+PASS Constructor Property: TypeError
+PASS Constructor Property: URIError
+PASS Other Properties of the Global Object
+PASS Other Property: Math
+PASS Other Property: JSON
+PASS EventTarget interface
+PASS EventTarget method: addEventListener
+PASS EventTarget method: removeEventListener
+PASS EventTarget method: dispatchEvent
+PASS Window interface
+PASS Window method: close
+PASS Window method: stop
+PASS Window method: focus
+PASS Window method: blur
+PASS Window method: open
+PASS Window method: alert
+PASS Window method: confirm
+PASS Window method: prompt
+PASS Window method: print
+PASS Window method: postMessage
+PASS Window method: btoa
+PASS Window method: atob
+PASS Window method: setTimeout
+PASS Window method: clearTimeout
+PASS Window method: setInterval
+PASS Window method: clearInterval
+PASS Window method: queueMicrotask
+PASS Window method: createImageBitmap
+PASS Window method: getSelection
+PASS Window method: getComputedStyle
+PASS Window method: matchMedia
+PASS Window method: moveBy
+PASS Window method: moveTo
+PASS Window method: resizeBy
+PASS Window method: resizeTo
+PASS Window method: scroll
+PASS Window method: scrollTo
+PASS Window method: scrollBy
+PASS Window readonly attribute: history
+PASS Window readonly attribute: frameElement
+PASS Window readonly attribute: navigator
+PASS Window readonly attribute: applicationCache
+PASS Window readonly attribute: sessionStorage
+PASS Window readonly attribute: localStorage
+PASS Window attribute: name
+PASS Window attribute: status
+PASS Window attribute: opener
+PASS Window attribute: onabort
+FAIL Window attribute: onafterprint assert_true: onafterprint in window expected true got false
+FAIL Window attribute: onbeforeprint assert_true: onbeforeprint in window expected true got false
+PASS Window attribute: onbeforeunload
+PASS Window attribute: onblur
+FAIL Window attribute: oncancel assert_true: oncancel in window expected true got false
+PASS Window attribute: oncanplay
+PASS Window attribute: oncanplaythrough
+PASS Window attribute: onchange
+PASS Window attribute: onclick
+FAIL Window attribute: onclose assert_true: onclose in window expected true got false
+PASS Window attribute: oncontextmenu
+PASS Window attribute: oncuechange
+PASS Window attribute: ondblclick
+PASS Window attribute: ondrag
+PASS Window attribute: ondragend
+PASS Window attribute: ondragenter
+PASS Window attribute: ondragleave
+PASS Window attribute: ondragover
+PASS Window attribute: ondragstart
+PASS Window attribute: ondrop
+PASS Window attribute: ondurationchange
+PASS Window attribute: onemptied
+PASS Window attribute: onended
+PASS Window attribute: onerror
+PASS Window attribute: onfocus
+PASS Window attribute: onhashchange
+PASS Window attribute: oninput
+PASS Window attribute: oninvalid
+PASS Window attribute: onkeydown
+PASS Window attribute: onkeypress
+PASS Window attribute: onkeyup
+PASS Window attribute: onload
+PASS Window attribute: onloadeddata
+PASS Window attribute: onloadedmetadata
+PASS Window attribute: onloadstart
+PASS Window attribute: onmessage
+PASS Window attribute: onmousedown
+PASS Window attribute: onmousemove
+PASS Window attribute: onmouseout
+PASS Window attribute: onmouseover
+PASS Window attribute: onmouseup
+PASS Window attribute: onmousewheel
+PASS Window attribute: onoffline
+PASS Window attribute: ononline
+PASS Window attribute: onpause
+PASS Window attribute: onplay
+PASS Window attribute: onplaying
+PASS Window attribute: onpagehide
+PASS Window attribute: onpageshow
+PASS Window attribute: onpopstate
+PASS Window attribute: onprogress
+PASS Window attribute: onratechange
+PASS Window attribute: onreset
+PASS Window attribute: onresize
+PASS Window attribute: onscroll
+PASS Window attribute: onseeked
+PASS Window attribute: onseeking
+PASS Window attribute: onselect
+PASS Window attribute: onstalled
+PASS Window attribute: onstorage
+PASS Window attribute: onsubmit
+PASS Window attribute: onsuspend
+PASS Window attribute: ontimeupdate
+PASS Window attribute: onunload
+PASS Window attribute: onvolumechange
+PASS Window attribute: onwaiting
+PASS Window unforgeable attribute: window
+PASS Window unforgeable attribute: document
+PASS Window unforgeable attribute: location
+PASS Window unforgeable attribute: top
+PASS Window replaceable attribute: self
+PASS Window replaceable attribute: locationbar
+PASS Window replaceable attribute: menubar
+PASS Window replaceable attribute: personalbar
+PASS Window replaceable attribute: scrollbars
+PASS Window replaceable attribute: statusbar
+PASS Window replaceable attribute: toolbar
+PASS Window replaceable attribute: frames
+PASS Window replaceable attribute: parent
+FAIL Window replaceable attribute: external assert_true: external in window expected true got false
+PASS Window replaceable attribute: length
+PASS Window replaceable attribute: origin
+PASS Window replaceable attribute: screen
+PASS Window replaceable attribute: scrollX
+PASS Window replaceable attribute: scrollY
+PASS Window replaceable attribute: pageXOffset
+PASS Window replaceable attribute: pageYOffset
+PASS Window replaceable attribute: innerWidth
+PASS Window replaceable attribute: innerHeight
+PASS Window replaceable attribute: screenLeft
+PASS Window replaceable attribute: screenTop
+PASS Window replaceable attribute: screenX
+PASS Window replaceable attribute: screenY
+PASS Window replaceable attribute: outerWidth
+PASS Window replaceable attribute: outerHeight
+PASS Window replaceable attribute: devicePixelRatio
+PASS constructor
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertieshttpshtmlfromrev243633trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertieshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https.html (from rev 243633, trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.html) (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https.html 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,327 @@
</span><ins>+<!doctype html>
+<meta charset=utf-8>
+<title>Properties of the window object</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com">
+<link rel="help" href="http://ecma-international.org/ecma-262/5.1/#sec-15.1">
+<link rel="help" href="https://heycam.github.io/webidl/#interface-prototype-object">
+<link rel="help" href="https://heycam.github.io/webidl/#es-attributes">
+<link rel="help" href="https://heycam.github.io/webidl/#es-operations">
+<link rel="help" href="https://dom.spec.whatwg.org/#eventtarget">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#window">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowtimers">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowbase64">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowsessionstorage">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#windowlocalstorage">
+<link rel="help" href="https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#dom-window-getselection">
+<link rel="help" href="http://dev.w3.org/csswg/cssom/#widl-def-Window">
+<link rel="help" href="http://dev.w3.org/csswg/cssom-view/#widl-def-Window">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id=log></div>
+<script>
+function assert_data_propdesc(pd, Writable, Enumerable, Configurable) {
+ assert_equals(typeof pd, "object");
+ assert_equals(pd.writable, Writable);
+ assert_equals(pd.enumerable, Enumerable);
+ assert_equals(pd.configurable, Configurable);
+}
+function assert_accessor_propdesc(pd, hasSetter, Enumerable, Configurable) {
+ assert_equals(typeof pd, "object");
+ assert_equals(typeof pd.get, "function");
+ assert_true("set" in pd,
+ "Should always have a setter property on the property descriptor");
+ assert_equals(typeof pd.set, hasSetter ? "function" : "undefined");
+ assert_equals(pd.enumerable, Enumerable);
+ assert_equals(pd.configurable, Configurable);
+}
+
+var unforgeableAttributes = [
+ "window",
+ "document",
+ "location",
+ "top"
+];
+
+var replaceableAttributes = [
+ "self",
+ "locationbar",
+ "menubar",
+ "personalbar",
+ "scrollbars",
+ "statusbar",
+ "toolbar",
+ "frames",
+ "parent",
+ "external",
+ "length",
+ "origin",
+
+ // CSSOM-View
+ "screen",
+ "scrollX",
+ "scrollY",
+ "pageXOffset",
+ "pageYOffset",
+ "innerWidth",
+ "innerHeight",
+ "screenLeft",
+ "screenTop",
+ "screenX",
+ "screenY",
+ "outerWidth",
+ "outerHeight",
+ "devicePixelRatio",
+];
+
+var methods = [
+ "close",
+ "stop",
+ "focus",
+ "blur",
+ "open",
+ "alert",
+ "confirm",
+ "prompt",
+ "print",
+ "postMessage",
+
+ // WindowBase64
+ "btoa",
+ "atob",
+
+ // WindowTimers
+ "setTimeout",
+ "clearTimeout",
+ "setInterval",
+ "clearInterval",
+
+ // Microtask queuing
+ "queueMicrotask",
+
+ // ImageBitmap
+ "createImageBitmap",
+
+ // HTML Editing APIs
+ "getSelection",
+
+ // CSSOM
+ "getComputedStyle",
+
+ // CSSOM-View
+ "matchMedia",
+ "moveBy",
+ "moveTo",
+ "resizeBy",
+ "resizeTo",
+ "scroll",
+ "scrollTo",
+ "scrollBy"
+];
+
+var readonlyAttributes = [
+ "history",
+ "frameElement",
+ "navigator",
+ "applicationCache",
+
+ // WindowSessionStorage
+ "sessionStorage",
+
+ // WindowLocalStorage
+ "localStorage",
+];
+
+var writableAttributes = [
+ "name",
+ "status",
+ "opener",
+ "onabort",
+ "onafterprint",
+ "onbeforeprint",
+ "onbeforeunload",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "onhashchange",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmessage",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onoffline",
+ "ononline",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onpagehide",
+ "onpageshow",
+ "onpopstate",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onresize",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onstalled",
+ "onstorage",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onunload",
+ "onvolumechange",
+ "onwaiting"
+];
+
+test(function() {
+ // 15.1.1 Value Properties of the Global Object
+ ["NaN", "Infinity", "undefined"].forEach(function(id) {
+ test(function() {
+ assert_true(id in window, id + " in window");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ false, false, false);
+ }, "Value Property: " + id);
+ });
+}, "Value Properties of the Global Object");
+test(function() {
+ // 15.1.2 Function Properties of the Global Object
+ ["eval", "parseInt", "parseFloat", "isNaN", "isFinite"].forEach(function(id) {
+ test(function() {
+ assert_true(id in window, id + " in window");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ true, false, true);
+ }, "Function Property: " + id);
+ });
+}, "Function Properties of the Global Object");
+test(function() {
+ // 15.1.3 URI Handling Function Properties
+ ["decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent"].forEach(function(id) {
+ test(function() {
+ assert_true(id in window, id + " in window");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ true, false, true);
+ }, "URI Handling Function Property: " + id);
+ });
+}, "URI Handling Function Properties");
+test(function() {
+ // 15.1.4 Constructor Properties of the Global Object
+ ["Object", "Function", "Array", "String", "Boolean", "Number", "Date",
+ "RegExp", "Error", "EvalError", "RangeError", "ReferenceError",
+ "SyntaxError", "TypeError", "URIError"].forEach(function(id) {
+ test(function() {
+ assert_true(id in window, id + " in window");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ true, false, true);
+ }, "Constructor Property: " + id);
+ });
+}, "Constructor Properties of the Global Object");
+test(function() {
+ // 15.1.5 Other Properties of the Global Object
+ ["Math", "JSON"].forEach(function(id) {
+ test(function() {
+ assert_true(id in window, id + " in window");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ true, false, true);
+ }, "Other Property: " + id);
+ });
+}, "Other Properties of the Global Object");
+test(function() {
+ // EventTarget interface
+ ["addEventListener", "removeEventListener", "dispatchEvent"].forEach(function(id) {
+ test(function() {
+ var EventTargetProto = EventTarget.prototype;
+ assert_true(id in window, id + " in window");
+ assert_equals(window[id], EventTargetProto[id]);
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(EventTargetProto, id),
+ true, true, true);
+ assert_equals(Object.getOwnPropertyDescriptor(window, id), undefined);
+ }, "EventTarget method: " + id);
+ });
+}, "EventTarget interface");
+test(function() {
+ // Window interface
+ methods.forEach(function(id) {
+ test(function() {
+ var WindowProto = Window.prototype;
+ assert_true(id in window, id + " in window");
+ assert_false(id in WindowProto, id + " in Window.prototype");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ true, true, true);
+ }, "Window method: " + id);
+ });
+ readonlyAttributes.forEach(function(id) {
+ test(function() {
+ var WindowProto = Window.prototype;
+ assert_true(id in window, id + " in window");
+ assert_false(id in WindowProto, id + " in Window.prototype");
+ assert_accessor_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ false, true, true);
+ }, "Window readonly attribute: " + id);
+ });
+ writableAttributes.forEach(function(id) {
+ test(function() {
+ var WindowProto = Window.prototype;
+ assert_true(id in window, id + " in window");
+ assert_false(id in WindowProto, id + " in Window.prototype");
+ assert_accessor_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ true, true, true);
+ }, "Window attribute: " + id);
+ });
+ unforgeableAttributes.forEach(function(id) {
+ test(function() {
+ var WindowProto = Window.prototype;
+ assert_true(id in window, id + " in window");
+ assert_false(id in WindowProto, id + " in Window.prototype");
+ // location has a [PutForwards] extended attribute.
+ assert_accessor_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ id === "location", true, false);
+ }, "Window unforgeable attribute: " + id);
+ });
+ replaceableAttributes.forEach(function(id) {
+ test(function() {
+ var WindowProto = Window.prototype;
+ assert_true(id in window, id + " in window");
+ assert_false(id in WindowProto, id + " in Window.prototype");
+ assert_accessor_propdesc(Object.getOwnPropertyDescriptor(window, id),
+ true, true, true);
+ }, "Window replaceable attribute: " + id);
+ });
+}, "Window interface");
+test(function() {
+ assert_equals(window.constructor, Window);
+ assert_false(window.hasOwnProperty("constructor"), "window.constructor should not be an own property.");
+ assert_data_propdesc(Object.getOwnPropertyDescriptor(Window.prototype, "constructor"),
+ true, false, true);
+}, "constructor");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1importedw3cwebplatformtestshtmlbrowsersthewindowobjectBarPropwindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window-expected.txt (0 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/the-window-object/BarProp.window-expected.txt 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL BarBrop objects of a nested Window assert_equals: a BarProp's visible is wrong expected true but got false
+FAIL BarProp objects of an auxiliary Window assert_equals: a BarProp's visible is wrong expected true but got false
+
</ins></span></pre></div>
<a id="trunkLayoutTeststestsoptionsjson"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/tests-options.json (243633 => 243634)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/tests-options.json 2019-03-29 01:29:27 UTC (rev 243633)
+++ trunk/LayoutTests/tests-options.json 2019-03-29 01:43:31 UTC (rev 243634)
</span><span class="lines">@@ -1223,6 +1223,9 @@
</span><span class="cx"> "imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html": [
</span><span class="cx"> "slow"
</span><span class="cx"> ],
</span><ins>+ "imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html": [
+ "slow"
+ ],
</ins><span class="cx"> "imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-screenx-screeny.html": [
</span><span class="cx"> "slow"
</span><span class="cx"> ],
</span><span class="lines">@@ -1232,6 +1235,9 @@
</span><span class="cx"> "imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-width-height.html": [
</span><span class="cx"> "slow"
</span><span class="cx"> ],
</span><ins>+ "imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener.html": [
+ "slow"
+ ],
</ins><span class="cx"> "imported/w3c/web-platform-tests/html/dom/interfaces.html": [
</span><span class="cx"> "slow"
</span><span class="cx"> ],
</span></span></pre>
</div>
</div>
</body>
</html>