<!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>[207181] trunk</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>select.options may return too many option elements
https://bugs.webkit.org/show_bug.cgi?id=163296

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Import html/infrastructure web-platform-tests from upstream.

* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/contains.json: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-expected.txt: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection-expected.txt: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist-expected.txt: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist.html: Added.
* web-platform-tests/html/infrastructure/common-dom-interfaces/collections/w3c-import.log: Added.
* web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/contains.json: Added.
* web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/w3c-import.log: Added.
* web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/contains.json: Added.
* web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/w3c-import.log: Added.
* web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign-expected.txt: Added.
* web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign.html: Added.
* web-platform-tests/html/infrastructure/conformance-requirements/extensibility/w3c-import.log: Added.
* web-platform-tests/html/infrastructure/terminology/plugins/sample.txt: Added.
* web-platform-tests/html/infrastructure/terminology/plugins/text-plain-expected.txt: Added.
* web-platform-tests/html/infrastructure/terminology/plugins/text-plain.html: Added.
* web-platform-tests/html/infrastructure/terminology/plugins/w3c-import.log: Added.

Source/WebCore:

select.options may return too many option elements. We're only supposed
to return the option element children of the select element, and the
option element children of all the optgroup element children of the
select element, in tree order:
- https://html.spec.whatwg.org/#dom-select-options
- https://html.spec.whatwg.org/#concept-select-option-list

Firefox and Chrome agrees with the specification. However, WebKit was
returning all the option elements that are descendants of the select
element.

Test: imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html

* html/HTMLOptionsCollection.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOptionsCollectionh">trunk/Source/WebCore/html/HTMLOptionsCollection.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/</li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/</li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionscontainsjson">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/contains.json</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmlallcollectionexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmlallcollectionhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmlformcontrolscollectionexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmlformcontrolscollectionhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmloptionscollectionexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmloptionscollectionhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionsradionodelistexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionsradionodelisthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/w3c-import.log</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/</li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommonmicrosyntaxesdatesandtimescontainsjson">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/contains.json</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommonmicrosyntaxesdatesandtimesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/w3c-import.log</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommonmicrosyntaxesnumberscontainsjson">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/contains.json</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommonmicrosyntaxesnumbersw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/w3c-import.log</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/</li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureconformancerequirementsextensibilityforeignexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureconformancerequirementsextensibilityforeignhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureconformancerequirementsextensibilityw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/w3c-import.log</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/</li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureterminologypluginssampletxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/sample.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureterminologypluginstextplainexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureterminologypluginstextplainhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureterminologypluginsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/w3c-import.log</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207180 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-12 00:17:17 UTC (rev 207180)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-10-11  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        select.options may return too many option elements
+        https://bugs.webkit.org/show_bug.cgi?id=163296
+
+        Reviewed by Ryosuke Niwa.
+
+        Import html/infrastructure web-platform-tests from upstream.
+
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/contains.json: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-expected.txt: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection-expected.txt: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist-expected.txt: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist.html: Added.
+        * web-platform-tests/html/infrastructure/common-dom-interfaces/collections/w3c-import.log: Added.
+        * web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/contains.json: Added.
+        * web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/w3c-import.log: Added.
+        * web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/contains.json: Added.
+        * web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/w3c-import.log: Added.
+        * web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign-expected.txt: Added.
+        * web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign.html: Added.
+        * web-platform-tests/html/infrastructure/conformance-requirements/extensibility/w3c-import.log: Added.
+        * web-platform-tests/html/infrastructure/terminology/plugins/sample.txt: Added.
+        * web-platform-tests/html/infrastructure/terminology/plugins/text-plain-expected.txt: Added.
+        * web-platform-tests/html/infrastructure/terminology/plugins/text-plain.html: Added.
+        * web-platform-tests/html/infrastructure/terminology/plugins/w3c-import.log: Added.
+
</ins><span class="cx"> 2016-10-10  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Annotate DOM API with CEReactions
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionscontainsjson"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/contains.json (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/contains.json                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/contains.json        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+[
+    {
+        &quot;id&quot;: &quot;htmlallcollection&quot;,
+        &quot;original_id&quot;: &quot;htmlallcollection&quot;
+    },
+    {
+        &quot;id&quot;: &quot;htmlformcontrolscollection&quot;,
+        &quot;original_id&quot;: &quot;htmlformcontrolscollection&quot;
+    },
+    {
+        &quot;id&quot;: &quot;htmloptionscollection&quot;,
+        &quot;original_id&quot;: &quot;htmloptionscollection&quot;
+    }
+]
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmlallcollectionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+
+
+PASS Test for HTMLAllCollection size 
+PASS Test lookup by index using () 
+PASS Test lookup by index using [] 
+PASS Test lookup IMG by name 
+PASS Test lookup IMG by namedItem  
+PASS Test lookup IMG in collection using () 
+PASS Test lookup IMG in collection using [] 
+PASS Test lookup IMG in collection using . 
+FAIL Test lookup tags in collection using . assert_equals: expected (string) &quot;tags&quot; but got (undefined) undefined
+PASS Should find root element too 
+FAIL Should find both anchors and produce a list undefined is not an object (evaluating 'document.all[&quot;foo&quot;].length')
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmlallcollectionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html id=&quot;root&quot;&gt;
+&lt;head&gt;
+&lt;title&gt;HTMLAllCollection Tests&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Dan Druta&quot; href=&quot;mailto:dan.druta@att.com&quot;/&gt;
+&lt;link rel=&quot;help&quot; href=&quot;2.7.2.1 - Common Infrastructure/Common DOM Interfaces/Collections/HTMLAllCollection&quot;/&gt;
+&lt;meta name=&quot;flags&quot; content=&quot;TOKENS&quot; /&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;TEST ASSERTION&quot;/&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body id=&quot;tags&quot;&gt;
+&lt;img src=&quot;../../../../images/green.png&quot; name=&quot;picture&quot;&gt;
+&lt;a name=&quot;foo&quot;&gt;&lt;/a&gt;
+&lt;a name=&quot;foo&quot;&gt;&lt;/a&gt;
+&lt;script&gt;
+test(function(){ assert_equals(document.all.length,14)}, &quot;Test for HTMLAllCollection size&quot;);
+
+test(function(){ assert_equals(document.all.item(0).tagName,&quot;HTML&quot;)}, &quot;Test lookup by index using ()&quot;);
+
+test(function(){ assert_equals(document.all[0].tagName,&quot;HTML&quot;)}, &quot;Test lookup by index using []&quot;);
+
+test(function(){ assert_equals(document.all.item(&quot;picture&quot;).nodeName,&quot;IMG&quot;)}, &quot;Test lookup IMG by name&quot;);
+
+test(function(){ assert_equals(document.all.namedItem(&quot;picture&quot;).nodeName,&quot;IMG&quot;)}, &quot;Test lookup IMG by namedItem &quot;);
+
+test(function(){ assert_equals(document.all(&quot;picture&quot;).nodeName,&quot;IMG&quot;)}, &quot;Test lookup IMG in collection using ()&quot;);
+
+test(function(){ assert_equals(document.all[&quot;picture&quot;].nodeName,&quot;IMG&quot;)}, &quot;Test lookup IMG in collection using []&quot;);
+
+test(function(){ assert_equals(document.all.picture.nodeName,&quot;IMG&quot;)}, &quot;Test lookup IMG in collection using .&quot;);
+
+test(function(){ assert_equals(document.all.tags.id,&quot;tags&quot;)}, &quot;Test lookup tags in collection using .&quot;);
+
+test(function() {
+  assert_equals(document.all[&quot;root&quot;], document.documentElement);
+}, &quot;Should find root element too&quot;);
+
+test(function() {
+  assert_equals(document.all[&quot;foo&quot;].length, 2);
+}, &quot;Should find both anchors and produce a list&quot;);
+
+test
+&lt;/script&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmlformcontrolscollectionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-expected.txt (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-expected.txt        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+
+PASS The length attribute must return the number of elements in the form 
+PASS HTMLFormControlsCollection.item(index) must return the indexed item 
+PASS HTMLFormControlsCollection[index] must return the indexed item 
+PASS HTMLFormControlsCollection is not callable 
+PASS HTMLFormControlsCollection[name] must return the named item 
+PASS HTMLFormControlsCollection.namedItem(name) must return the named item 
+PASS The namedItem(name) must return an Element 
+PASS The namedItem(name) must return RadioNodeList 
+PASS The namedItem(name) must return null if the name is empty 
+PASS The namedItem(name) must return null if there is no matched element 
+PASS Controls can be indexed by id or name attribute 
+PASS The namedItem(name) must return the items with id or name attribute 
+PASS The HTMLFormControlsCollection interface is used for collections of listed elements in form element 
+PASS The HTMLFormControlsCollection interface is used for collections of listed elements in fieldset element 
+PASS The controls in the form element must be sorted in tree order 
+  
+
+  
+  
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmlformcontrolscollectionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,116 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: the HTMLFormControlsCollection interface&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;https://html.spec.whatwg.org/multipage/multipage/common-dom-interfaces.html#htmlformcontrolscollection&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;form id=&quot;f1&quot;&gt;
+  &lt;input type=&quot;radio&quot; id=&quot;r1&quot;&gt;
+  &lt;keygen id=&quot;kg&quot; name=&quot;key&quot;&gt;&lt;/keygen&gt;
+&lt;/form&gt;
+&lt;form id=&quot;f2&quot;&gt;
+  &lt;table&gt;
+    &lt;tr&gt;
+      &lt;td&gt;
+        &lt;input type=&quot;checkbox&quot; id=&quot;cb&quot;&gt;
+        &lt;input type=&quot;checkbox&quot; name=&quot;cb&quot;&gt;
+      &lt;/td&gt;
+    &lt;/tr&gt;
+    &lt;tr&gt;
+      &lt;td&gt;
+        &lt;button id=&quot;btn&quot;&gt;&lt;/button&gt;
+        &lt;button name=&quot;btn&quot;&gt;&lt;/button&gt;
+      &lt;/td&gt;
+    &lt;/tr&gt;
+  &lt;/table&gt;
+&lt;/form&gt;
+
+&lt;script&gt;
+
+var coll1, coll2, rdo;
+
+setup(function () {
+  rdo = document.getElementById(&quot;r1&quot;);
+  coll1 = document.forms[0].elements;
+  coll2 = document.forms[1].elements;
+});
+
+//length
+test(function () {
+  assert_equals(coll1.length, 2, &quot;The length attribute is incorrect.&quot;);
+  assert_equals(coll2.length, 4, &quot;The length attribute is incorrect.&quot;);
+}, &quot;The length attribute must return the number of elements in the form&quot;);
+
+//getter - index
+test(function () {
+  assert_equals(coll1.item(0), rdo, &quot;HTMLFormControlsCollection.item(index) should return the 'input' element in radio status.&quot;);
+}, &quot;HTMLFormControlsCollection.item(index) must return the indexed item&quot;);
+
+test(function () {
+  assert_equals(coll1[0], rdo, &quot;HTMLFormControlsCollection[index] should return the 'input' element in radio status.&quot;);
+}, &quot;HTMLFormControlsCollection[index] must return the indexed item&quot;);
+
+//getter - name
+test(function () {
+  assert_throws(TypeError(), function() { coll1(&quot;r1&quot;) });
+}, &quot;HTMLFormControlsCollection is not callable&quot;);
+
+test(function () {
+  assert_equals(coll1[&quot;r1&quot;], rdo, &quot;HTMLFormControlsCollection[name] should return the 'input' element in radio status.&quot;);
+}, &quot;HTMLFormControlsCollection[name] must return the named item&quot;);
+
+//getter - namedItem
+test(function () {
+  assert_equals(coll1.namedItem(&quot;r1&quot;), rdo, &quot;HTMLFormControlsCollection.namedItem(name) should return the 'input' element in radio status.&quot;);
+}, &quot;HTMLFormControlsCollection.namedItem(name) must return the named item&quot;);
+
+test(function () {
+  assert_true(coll1.namedItem(&quot;r1&quot;) instanceof Element, &quot;Can not return 'Element' object.&quot;);
+}, &quot;The namedItem(name) must return an Element&quot;);
+
+test(function () {
+  assert_true(coll2.namedItem(&quot;cb&quot;) instanceof RadioNodeList, &quot;Can not return 'RadioNodeList' object.&quot;);
+}, &quot;The namedItem(name) must return RadioNodeList&quot;);
+
+test(function () {
+  assert_equals(coll1.namedItem(&quot;&quot;), null, &quot;The return value of namedItem() should be null.&quot;);
+}, &quot;The namedItem(name) must return null if the name is empty&quot;);
+
+test(function () {
+  assert_equals(coll1.namedItem(&quot;test&quot;), null, &quot;The return value of namedItem() should be null.&quot;);
+}, &quot;The namedItem(name) must return null if there is no matched element&quot;);
+
+test(function () {
+  assert_equals(coll1.namedItem(&quot;kg&quot;), document.getElementById(&quot;kg&quot;), &quot;Controls can be named by 'id' attribute.&quot;);
+  assert_equals(coll1.namedItem(&quot;key&quot;), document.getElementById(&quot;kg&quot;), &quot;Controls can be named by 'name' attribute.&quot;);
+}, &quot;Controls can be indexed by id or name attribute&quot;);
+
+test(function () {
+  assert_equals(coll2.namedItem(&quot;btn&quot;).length, 2, &quot;The length attribute should be 2.&quot;);
+}, &quot;The namedItem(name) must return the items with id or name attribute&quot;);
+
+//various controls in fieldset and form
+var containers = [&quot;form&quot;, &quot;fieldset&quot;],
+    controls = [&quot;button&quot;, &quot;fieldset&quot;, &quot;input&quot;, &quot;keygen&quot;, &quot;object&quot;, &quot;output&quot;, &quot;select&quot;, &quot;textarea&quot;];
+for (var m = 0; m &lt; containers.length; m++) {
+  test(function () {
+    var container = document.createElement(containers[m]);
+    var len = controls.length;
+    for (var n = 0; n &lt; len; n++)
+      container.appendChild(document.createElement(controls[n]));
+    document.body.appendChild(container);
+    assert_equals(container.elements.length, len, &quot;The length should be &quot; + len + &quot;.&quot;);
+  }, &quot;The HTMLFormControlsCollection interface is used for collections of listed elements in &quot; + containers[m] + &quot; element&quot;);
+}
+
+//Check the controls' order
+test(function () {
+  var opt = document.forms[1].insertBefore(document.createElement(&quot;output&quot;), document.forms[1].firstChild);
+  assert_array_equals(document.forms[1].elements,
+                      [opt, document.getElementsByTagName(&quot;input&quot;)[1], document.getElementsByTagName(&quot;input&quot;)[2],
+                      document.getElementsByTagName(&quot;button&quot;)[0], document.getElementsByTagName(&quot;button&quot;)[1]]);
+}, &quot;The controls in the form element must be sorted in tree order&quot;);
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmloptionscollectionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection-expected.txt (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection-expected.txt        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+  
+
+PASS Original length 
+PASS Setting length to original value has no effect 
+PASS Setting length to shorter value 
+PASS Setting length to longer value 
+PASS Insert &lt;p&gt;&lt;option&gt;6&lt;/option&gt;&lt;/p&gt; into &lt;select&gt; 
+PASS Insert &lt;select&gt;&lt;option&gt;6&lt;/option&gt;&lt;/select&gt; into &lt;select&gt; 
+PASS Insert &lt;optgroup&gt;&lt;option&gt;6&lt;/option&gt;&lt;/optgroup&gt; into &lt;select&gt; 
+PASS Insert &lt;optgroup&gt;&lt;optgroup&gt;&lt;option&gt;6&lt;/option&gt;&lt;/optgroup&gt;&lt;/optgroup&gt; into &lt;select&gt; 
+PASS namedItem id attribute 
+PASS namedItem name attribute 
+PASS namedItem doesn't match anything 
+PASS namedItem multiple IDs 
+PASS namedItem multiple names 
+PASS namedItem multiple name and ID 
+PASS namedItem multiple name and ID with multiple attributes 
+PASS namedItem id attribute multiple attributes one element 
+PASS namedItem name attribute multiple attributes one element 
+PASS HTMLOptionsCollection [index] method return the item with index 
+PASS HTMLOptionsCollection [name] method return the item with name 
+PASS HTMLOptionsCollection.item(index) method return the item with index 
+PASS HTMLOptionsCollection.item(name) method return the item with index 0 
+PASS HTMLOptionsCollection.add method insert HTMLOptionElement Option element 
+PASS HTMLOptionsCollection.remove method remove Option element by index 
+FAIL Add non-option to collection assert_throws: function &quot;function () {b_opts.add(add);}&quot; did not throw
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionshtmloptionscollectionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,216 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;title&gt;HTMLOptionsCollection&lt;/title&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;link rel=&quot;help&quot; href=&quot;https://html.spec.whatwg.org/multipage/#htmloptionscollection-0&quot;&gt;
+&lt;select id=a&gt;
+  &lt;option&gt;1&lt;/option&gt;
+  &lt;option&gt;2&lt;/option&gt;
+  &lt;option&gt;3&lt;/option&gt;
+&lt;!-- Note whitespace is important --&gt;
+  &lt;option&gt;4&lt;/option&gt;
+  &lt;option&gt;5&lt;/option&gt;
+&lt;/select&gt;
+
+&lt;select id=b&gt;
+  &lt;option id=b1&gt;1&lt;/option&gt;
+  &lt;option name=b2&gt;2&lt;/option&gt;
+  &lt;option id=b3&gt;3&lt;/option&gt;
+  &lt;option id=b3&gt;4&lt;/option&gt;
+  &lt;option name=b4&gt;5&lt;/option&gt;
+  &lt;option name=b4&gt;6&lt;/option&gt;
+  &lt;option id=b5&gt;7&lt;/option&gt;
+  &lt;option name=b5&gt;8&lt;/option&gt;
+  &lt;option id=b6 name=b7&gt;9&lt;/option&gt;
+  &lt;option id=b6 name=b6&gt;10&lt;/option&gt;
+  &lt;option id=b8 name=b9&gt;11&lt;/option&gt;
+&lt;/select&gt;
+
+&lt;script&gt;
+var a;
+var a_opts;
+var a_original_innerHTML;
+var b;
+var b_opts;
+
+setup(function() {
+  a = document.getElementById(&quot;a&quot;);
+  a_opts = a.options;
+  a_original_innerHTML = a.innerHTML;
+  a.innerHTML = a_original_innerHTML;
+  b = document.getElementById(&quot;b&quot;);
+  b_opts = b.options;
+  b_original_innerHTML = b.innerHTML;
+  b.innerHTML = b_original_innerHTML;
+})
+
+function assert_values_equals(coll, expected_values, message) {
+  actual = [];
+  for (var i=0; i&lt;coll.length; i++) {
+    actual.push(coll[i].value);
+  }
+  assert_array_equals(actual, expected_values, message);
+}
+
+test(function() {
+  assert_equals(5, a_opts.length);
+}, &quot;Original length&quot;);
+
+test(function() {
+  a.innerHTML = a_original_innerHTML;
+  a_opts.value = &quot;3&quot;;
+  a_opts.length = 5;
+  assert_equals(a_opts.length, 5);
+  assert_equals(a_opts.value, &quot;3&quot;);
+}, &quot;Setting length to original value has no effect&quot;);
+
+test(function() {
+  a.innerHTML = a_original_innerHTML;
+  a.value = 3;
+  a_opts.length = 3;
+  assert_equals(3, a_opts.length, &quot;Correct length&quot;);
+  assert_values_equals(a_opts, [&quot;1&quot;,&quot;2&quot;,&quot;3&quot;], &quot;Correct elements remain&quot;)
+  assert_equals(a_opts.value, &quot;3&quot;, &quot;Correct value set&quot;);
+  assert_equals(a.childNodes.length, 11, &quot;Correct number of child nodes&quot;)
+}, &quot;Setting length to shorter value&quot;);
+
+test(function() {
+  a.innerHTML = a_original_innerHTML;
+  a.value = 3;
+  a_opts.length = 7;
+  assert_equals(a_opts.length, 7, &quot;Correct length&quot;);
+  assert_values_equals(a_opts, [&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;&quot;,&quot;&quot;], &quot;Correct elements inserted&quot;)
+  assert_equals(a.value, &quot;3&quot;, &quot;Correct value set&quot;);
+  assert_equals(a.childNodes.length, 15, &quot;Correct number of child nodes&quot;)
+}, &quot;Setting length to longer value&quot;);
+
+test(function() {
+  a.innerHTML = a_original_innerHTML;
+  var newChild = document.createElement(&quot;p&quot;);
+  var newOption = document.createElement(&quot;option&quot;);
+  newOption.textContent = &quot;6&quot;;
+  newChild.appendChild(newOption);
+  a.appendChild(newChild);
+  a.value = 3;
+  assert_equals(a_opts.length, 5, &quot;Correct length&quot;);
+  assert_values_equals(a_opts, [&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;], &quot;Correct elements inserted&quot;)
+  assert_equals(a.value, &quot;3&quot;, &quot;Correct value set&quot;);
+}, &quot;Insert &lt;p&gt;&lt;option&gt;6&lt;/option&gt;&lt;/p&gt; into &lt;select&gt;&quot;);
+
+test(function() {
+  a.innerHTML = a_original_innerHTML;
+  var newChild = document.createElement(&quot;select&quot;);
+  var newOption = document.createElement(&quot;option&quot;);
+  newOption.textContent = &quot;6&quot;;
+  newChild.appendChild(newOption);
+  a.appendChild(newChild);
+  a.value = 3;
+  assert_equals(a_opts.length, 5, &quot;Correct length&quot;);
+  assert_values_equals(a_opts, [&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;], &quot;Correct elements inserted&quot;)
+  assert_equals(a.value, &quot;3&quot;, &quot;Correct value set&quot;);
+}, &quot;Insert &lt;select&gt;&lt;option&gt;6&lt;/option&gt;&lt;/select&gt; into &lt;select&gt;&quot;);
+
+test(function() {
+  //This tests the spec but it is probably wrong here; see bug 12665
+  a.innerHTML = a_original_innerHTML;
+  var newChild = document.createElement(&quot;optgroup&quot;);
+  var newOption = document.createElement(&quot;option&quot;);
+  newOption.textContent = &quot;6&quot;;
+  newChild.appendChild(newOption);
+  a.appendChild(newChild);
+  a.value = 3;
+  assert_equals(a_opts.length, 6, &quot;Correct length&quot;);
+  assert_values_equals(a_opts, [&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;, &quot;6&quot;], &quot;Correct elements inserted&quot;)
+  assert_equals(a.value, &quot;3&quot;, &quot;Correct value set&quot;);
+}, &quot;Insert &lt;optgroup&gt;&lt;option&gt;6&lt;/option&gt;&lt;/optgroup&gt; into &lt;select&gt;&quot;);
+
+test(function() {
+  a.innerHTML = a_original_innerHTML;
+  var newChild = document.createElement(&quot;optgroup&quot;);
+  var newChild1 = document.createElement(&quot;optgroup&quot;);
+  var newOption = document.createElement(&quot;option&quot;);
+  newOption.textContent = &quot;6&quot;;
+  newChild.appendChild(newChild1);
+  newChild1.appendChild(newOption);
+  a.appendChild(newChild);
+  a.value = 3;
+  assert_equals(a_opts.length, 5, &quot;Correct length&quot;);
+  assert_values_equals(a_opts, [&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;], &quot;Correct elements inserted&quot;)
+  assert_equals(a.value, &quot;3&quot;, &quot;Correct value set&quot;);
+}, &quot;Insert &lt;optgroup&gt;&lt;optgroup&gt;&lt;option&gt;6&lt;/option&gt;&lt;/optgroup&gt;&lt;/optgroup&gt; into &lt;select&gt;&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;b1&quot;).value, &quot;1&quot;);
+}, &quot;namedItem id attribute&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;b2&quot;).value, &quot;2&quot;);
+}, &quot;namedItem name attribute&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;c&quot;), null);
+}, &quot;namedItem doesn't match anything&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;b3&quot;).value, &quot;3&quot;);
+}, &quot;namedItem multiple IDs&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;b4&quot;).value, &quot;5&quot;);
+}, &quot;namedItem multiple names&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;b5&quot;).value, &quot;7&quot;);
+}, &quot;namedItem multiple name and ID&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;b6&quot;).value, &quot;9&quot;);
+}, &quot;namedItem multiple name and ID with multiple attributes&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;b8&quot;).value, &quot;11&quot;);
+}, &quot;namedItem id attribute multiple attributes one element&quot;);
+
+test(function() {
+  assert_equals(b_opts.namedItem(&quot;b9&quot;).value, &quot;11&quot;);
+}, &quot;namedItem name attribute multiple attributes one element&quot;);
+
+test(function() {
+  assert_true(b_opts[0] instanceof HTMLOptionElement);
+  assert_equals(b_opts[0].innerHTML, &quot;1&quot;);
+},  &quot;HTMLOptionsCollection [index] method return the item with index&quot;);
+
+test(function() {
+  assert_true(b_opts[&quot;b2&quot;] instanceof HTMLOptionElement);
+  assert_equals(b_opts[&quot;b2&quot;].innerHTML, &quot;2&quot;);
+},  &quot;HTMLOptionsCollection [name] method return the item with name&quot;);
+
+test(function() {
+  assert_true(b_opts.item(0) instanceof HTMLOptionElement);
+  assert_equals(b_opts.item(0).innerHTML, &quot;1&quot;);
+},  &quot;HTMLOptionsCollection.item(index) method return the item with index&quot;);
+
+test(function() {
+  assert_true(b_opts.item(&quot;b2&quot;) instanceof HTMLOptionElement);
+  assert_equals(b_opts.item(&quot;b2&quot;).innerHTML, &quot;1&quot;);
+},  &quot;HTMLOptionsCollection.item(name) method return the item with index 0&quot;);
+
+test(function() {
+  var b_opts_length = b_opts.length;
+  b_opts.add(new Option(&quot;2&quot;, &quot;2&quot;));
+  assert_equals(b_opts[b_opts_length].value, &quot;2&quot;);
+}, &quot;HTMLOptionsCollection.add method insert HTMLOptionElement Option element&quot;);
+
+test(function() {
+  var b_opts_length = b_opts.length;
+  b_opts.remove(0);
+  assert_equals(b_opts.length, b_opts_length - 1);
+}, &quot;HTMLOptionsCollection.remove method remove Option element by index&quot;);
+
+test(function() {
+  var add = document.createElement(&quot;p&quot;);
+  assert_throws(new TypeError(), function() {b_opts.add(add);});
+}, &quot;Add non-option to collection&quot;);
+
+&lt;/script&gt;
+&lt;div id=log&gt;&lt;/div&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionsradionodelistexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist-expected.txt (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist-expected.txt        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+
+PASS The value attribute should be empty if no element is checked 
+PASS The RadioNodeList.value must be the first checked radio button's value 
+PASS Check the RadioNodeList.value on getting 
+PASS Check the RadioNodeList.value on setting 
+PASS Check the RadioNodeList.value on setting to 'on' 
+    
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionsradionodelisthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist.html (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist.html        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;HTML Test: the RadioNodeList interface&lt;/title&gt;
+&lt;link rel=&quot;author&quot; title=&quot;Intel&quot; href=&quot;http://www.intel.com/&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;https://html.spec.whatwg.org/multipage/multipage/common-dom-interfaces.html#radionodelist&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;form &gt;
+  &lt;input type=&quot;checkbox&quot; name=&quot;rdo&quot; value=&quot;0&quot; id=&quot;r0&quot; checked&gt;
+  &lt;input type=&quot;radio&quot; name=&quot;rdo&quot; id=&quot;r1&quot;&gt;
+  &lt;input type=&quot;radio&quot; name=&quot;rdo&quot; id=&quot;r2&quot; value=&quot;2&quot;&gt;
+&lt;/form&gt;
+&lt;script&gt;
+
+var rdoList;
+
+setup(function () {
+  rdoList = document.forms[0].elements.namedItem(&quot;rdo&quot;);
+});
+
+//on getting
+test(function () {
+  assert_equals(rdoList.value, &quot;&quot;, &quot;The value attribute should be empty.&quot;);
+}, &quot;The value attribute should be empty if no element is checked&quot;);
+
+test(function () {
+  document.getElementById(&quot;r2&quot;).checked = true;
+  assert_equals(rdoList.value, &quot;2&quot;, &quot;The value attribute should be 2.&quot;);
+}, &quot;The RadioNodeList.value must be the first checked radio button's value&quot;);
+
+test(function () {
+  document.getElementById(&quot;r1&quot;).checked = true;
+  assert_equals(rdoList.value, &quot;on&quot;, &quot;The value attribute should be on.&quot;);
+
+  document.getElementById(&quot;r1&quot;).value = 1;
+  assert_equals(rdoList.value, &quot;1&quot;, &quot;The value attribute should be 1.&quot;);
+}, &quot;Check the RadioNodeList.value on getting&quot;);
+
+//on setting
+test(function () {
+  assert_equals(rdoList.value, document.getElementById(&quot;r1&quot;).value,
+                &quot;The value attribute should be equal to the first checked radio input element's value.&quot;);
+  assert_false(document.getElementById(&quot;r2&quot;).checked,
+               &quot;The second radio input element should not be checked.&quot;);
+
+  rdoList.value = &quot;2&quot;;
+  assert_equals(rdoList.value, document.getElementById(&quot;r2&quot;).value,
+                &quot;The value attribute should be equal to the second radio input element's value.&quot;);
+  assert_true(document.getElementById(&quot;r2&quot;).checked,
+              &quot;The second radio input element should be checked.&quot;);
+
+  //Do nothing if no element's value is equal to new value.
+  rdoList.value = &quot;3&quot;;
+  assert_equals(rdoList.value, document.getElementById(&quot;r2&quot;).value,
+                &quot;The value attribute should be the second radio input element's value.&quot;);
+  assert_true(document.getElementById(&quot;r2&quot;).checked,
+              &quot;The second radio input element should be checked.&quot;);
+}, &quot;Check the RadioNodeList.value on setting&quot;);
+
+//setting to on, specific case
+test(function () {
+  rdoList.value = &quot;on&quot;;
+  assert_equals(rdoList.value, document.getElementById(&quot;r2&quot;).value,
+                &quot;The value attribute should be the second radio input element's value.&quot;);
+  assert_true(document.getElementById(&quot;r2&quot;).checked,
+              &quot;The second radio input element should be checked.&quot;);
+
+  document.getElementById(&quot;r1&quot;).removeAttribute(&quot;value&quot;);
+  rdoList.value = &quot;on&quot;;
+  assert_equals(rdoList.value, document.getElementById(&quot;r1&quot;).value,
+                &quot;The value attribute should be the first radio input element's value.&quot;);
+  assert_true(document.getElementById(&quot;r1&quot;).checked,
+              &quot;The first radio input element should be checked.&quot;);
+}, &quot;Check the RadioNodeList.value on setting to 'on'&quot;);
+
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommondominterfacescollectionsw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/w3c-import.log (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/w3c-import.log                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/w3c-import.log        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the W3C CSS or WPT github:
+        https://github.com/w3c/csswg-test
+        https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/contains.json
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/radionodelist.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommonmicrosyntaxesdatesandtimescontainsjson"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/contains.json (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/contains.json                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/contains.json        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+[
+    {
+        &quot;id&quot;: &quot;months&quot;,
+        &quot;original_id&quot;: &quot;months&quot;
+    },
+    {
+        &quot;id&quot;: &quot;dates&quot;,
+        &quot;original_id&quot;: &quot;dates&quot;
+    },
+    {
+        &quot;id&quot;: &quot;yearless-dates&quot;,
+        &quot;original_id&quot;: &quot;yearless-dates&quot;
+    },
+    {
+        &quot;id&quot;: &quot;times&quot;,
+        &quot;original_id&quot;: &quot;times&quot;
+    },
+    {
+        &quot;id&quot;: &quot;local-dates-and-times&quot;,
+        &quot;original_id&quot;: &quot;local-dates-and-times&quot;
+    },
+    {
+        &quot;id&quot;: &quot;time-zones&quot;,
+        &quot;original_id&quot;: &quot;time-zones&quot;
+    },
+    {
+        &quot;id&quot;: &quot;global-dates-and-times&quot;,
+        &quot;original_id&quot;: &quot;global-dates-and-times&quot;
+    },
+    {
+        &quot;id&quot;: &quot;weeks&quot;,
+        &quot;original_id&quot;: &quot;weeks&quot;
+    },
+    {
+        &quot;id&quot;: &quot;durations&quot;,
+        &quot;original_id&quot;: &quot;durations&quot;
+    },
+    {
+        &quot;id&quot;: &quot;vaguer-moments-in-time&quot;,
+        &quot;original_id&quot;: &quot;vaguer-moments-in-time&quot;
+    }
+]
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommonmicrosyntaxesdatesandtimesw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/w3c-import.log (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/w3c-import.log                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/w3c-import.log        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the W3C CSS or WPT github:
+        https://github.com/w3c/csswg-test
+        https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/dates-and-times/contains.json
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommonmicrosyntaxesnumberscontainsjson"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/contains.json (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/contains.json                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/contains.json        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+[
+    {
+        &quot;id&quot;: &quot;signed-integers&quot;,
+        &quot;original_id&quot;: &quot;signed-integers&quot;
+    },
+    {
+        &quot;id&quot;: &quot;non-negative-integers&quot;,
+        &quot;original_id&quot;: &quot;non-negative-integers&quot;
+    },
+    {
+        &quot;id&quot;: &quot;floating-point-numbers&quot;,
+        &quot;original_id&quot;: &quot;floating-point-numbers&quot;
+    },
+    {
+        &quot;id&quot;: &quot;percentages-and-dimensions&quot;,
+        &quot;original_id&quot;: &quot;percentages-and-dimensions&quot;
+    },
+    {
+        &quot;id&quot;: &quot;lists-of-integers&quot;,
+        &quot;original_id&quot;: &quot;lists-of-integers&quot;
+    },
+    {
+        &quot;id&quot;: &quot;lists-of-dimensions&quot;,
+        &quot;original_id&quot;: &quot;lists-of-dimensions&quot;
+    }
+]
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructurecommonmicrosyntaxesnumbersw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/w3c-import.log (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/w3c-import.log                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/w3c-import.log        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the W3C CSS or WPT github:
+        https://github.com/w3c/csswg-test
+        https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-microsyntaxes/numbers/contains.json
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureconformancerequirementsextensibilityforeignexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign-expected.txt (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign-expected.txt        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+User agents must treat elements and attributes that they do not understand as semantically neutral; leaving them in the DOM (for DOM processors), and styling them according to CSS (for CSS processors), but not inferring any meaning from them.
+
+Foobar
+Running test...
+
+PASS foreign content 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureconformancerequirementsextensibilityforeignhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign.html (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign.html        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html lang=&quot;en&quot; foo='bar'&gt;
+  &lt;head foo='bar'&gt;
+    &lt;meta charset=&quot;utf-8&quot; foo='bar'&gt;
+    &lt;title id='title' foo='bar'&gt;Foreign content&lt;/title&gt;
+    &lt;link rel=&quot;author&quot; title=&quot;Philippe Le Hegaret&quot; href=&quot;mailto:plh@w3.org&quot;  foo='bar'&gt;
+    &lt;link rel=&quot;help&quot; href=&quot;https://html.spec.whatwg.org/multipage/#extensibility&quot;  foo='bar'&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;  foo='bar'&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot; foo='bar'&gt;&lt;/script&gt;
+  &lt;/head&gt;
+
+  &lt;body foo='bar'&gt;
+
+    &lt;p class='assert' foo='bar'&gt;User agents must treat elements and attributes that they do not understand as semantically neutral; leaving them in the DOM (for DOM processors), and styling them according to CSS (for CSS processors), but not inferring any meaning from them.&lt;/p&gt;
+
+    &lt;foo foo='bar' echo&gt;Foobar&lt;/foo&gt;
+
+    &lt;div id=&quot;log&quot;&gt;Running test...&lt;/div&gt;
+
+    &lt;script&gt;
+      var t = async_test(&quot;foreign content&quot;);
+
+      on_event(window, &quot;load&quot;,
+               t.step_func(function() {
+                 var nodes = document.getElementsByTagName(&quot;*&quot;);
+                 var cont = true;
+                 var last = null;
+                 for(var i=0;i&lt;nodes.length &amp;&amp; cont; i++) {
+                   var as = nodes.item(i).getAttribute(&quot;foo&quot;);
+                   if (!(as === &quot;bar&quot;) &amp;&amp; (nodes.item(i).getAttribute(&quot;id&quot;) === &quot;log&quot;)) {
+                     cont = false;
+                   } else {
+                     last = nodes.item(i);
+                     assert_equals(as, &quot;bar&quot;);
+                   }
+                 }
+
+                 assert_equals(last.nodeName, &quot;FOO&quot;);
+                 assert_equals(last.getAttribute(&quot;echo&quot;), &quot;&quot;);
+                 assert_equals(last.getAttribute(&quot;charly&quot;), null);
+                 t.done();
+               }));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureconformancerequirementsextensibilityw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/w3c-import.log (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/w3c-import.log                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/w3c-import.log        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the W3C CSS or WPT github:
+        https://github.com/w3c/csswg-test
+        https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/conformance-requirements/extensibility/foreign.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureterminologypluginssampletxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/sample.txt (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/sample.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/sample.txt        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This is a sample text/plain document.
+
+This is not an HTML document.
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureterminologypluginstextplainexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain-expected.txt (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain-expected.txt        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Test of plugin support
+
+A user agent must not consider the types text/plain and application/octet-stream as having a registered plugin.
+
+
+Running test...
+
+PASS A user agent must not consider the type text/plain as having a registered plugin. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureterminologypluginstextplainhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain.html (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain.html        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html lang=&quot;en&quot;&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title id='title'&gt;Media Types&lt;/title&gt;
+    &lt;link rel=&quot;author&quot; title=&quot;Philippe Le Hegaret&quot; href=&quot;mailto:plh@w3.org&quot;/&gt;
+    &lt;link rel=&quot;help&quot; href=&quot;https://html.spec.whatwg.org/multipage/#plugins&quot;/&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+
+  &lt;body&gt;
+    &lt;script&gt;
+      var t = async_test(&quot;A user agent must not consider the type text/plain as having a registered plugin.&quot;);
+
+      window.onload =
+        t.step_func(function() {
+        assert_equals(document.getElementById(&quot;frameContext&quot;).contentDocument.body.firstChild.nodeName, &quot;PRE&quot;);
+        t.done();
+      });
+    &lt;/script&gt;
+
+    &lt;h1&gt;Test of plugin support&lt;/h1&gt;
+    &lt;p class='assert'&gt;A user agent must not consider the types text/plain and application/octet-stream as having a registered plugin.&lt;/p&gt;
+
+    &lt;iframe id=&quot;frameContext&quot; src=&quot;sample.txt&quot;&gt;&lt;/iframe&gt;
+
+
+    &lt;div id=&quot;log&quot;&gt;Running test...&lt;/div&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlinfrastructureterminologypluginsw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/w3c-import.log (0 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/w3c-import.log                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/w3c-import.log        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the W3C CSS or WPT github:
+        https://github.com/w3c/csswg-test
+        https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/sample.txt
+/LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/terminology/plugins/text-plain.html
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207180 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-12 00:17:17 UTC (rev 207180)
+++ trunk/Source/WebCore/ChangeLog        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-10-11  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        select.options may return too many option elements
+        https://bugs.webkit.org/show_bug.cgi?id=163296
+
+        Reviewed by Ryosuke Niwa.
+
+        select.options may return too many option elements. We're only supposed
+        to return the option element children of the select element, and the
+        option element children of all the optgroup element children of the
+        select element, in tree order:
+        - https://html.spec.whatwg.org/#dom-select-options
+        - https://html.spec.whatwg.org/#concept-select-option-list
+
+        Firefox and Chrome agrees with the specification. However, WebKit was
+        returning all the option elements that are descendants of the select
+        element.
+
+        Test: imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html
+
+        * html/HTMLOptionsCollection.h:
+
</ins><span class="cx"> 2016-10-11  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix assertion when creating first WebCore::URL from non-main thread after r207162
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOptionsCollectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOptionsCollection.h (207180 => 207181)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOptionsCollection.h        2016-10-12 00:17:17 UTC (rev 207180)
+++ trunk/Source/WebCore/html/HTMLOptionsCollection.h        2016-10-12 00:25:55 UTC (rev 207181)
</span><span class="lines">@@ -70,7 +70,14 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool HTMLOptionsCollection::elementMatches(Element&amp; element) const
</span><span class="cx"> {
</span><del>-    return element.hasTagName(HTMLNames::optionTag);
</del><ins>+    if (!element.hasTagName(HTMLNames::optionTag))
+        return false;
+
+    if (element.parentNode() == &amp;selectElement())
+        return true;
+
+    ASSERT(element.parentNode());
+    return element.parentNode()-&gt;hasTagName(HTMLNames::optgroupTag) &amp;&amp; element.parentNode()-&gt;parentNode() == &amp;selectElement();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>

</body>
</html>