<!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>[203377] 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/203377">203377</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-07-18 15:33:32 -0700 (Mon, 18 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=158008

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

The 2 first parameters to addEventListener() / removeEventListener() should be
mandatory:
- https://dom.spec.whatwg.org/#interface-eventtarget

Firefox 46 and Chrome 50 both match the specification and throw an exception when those
parameters are omitted. However, those parameters were marked as optional in WebKit and
the calls were no-ops if those parameters were omitted. This patch aligns our behavior
with the specification and other browsers.

Test: fast/dom/eventtarget-api-parameters.html

* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength): Deleted.
* dom/EventTarget.idl:

LayoutTests:

* fast/dom/Window/window-legacy-event-listener-expected.txt: Removed.
* fast/dom/Window/window-legacy-event-listener.html: Removed.
* fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt: Removed.
* fast/dom/XMLHttpRequest-legacy-event-listener.html: Removed.
* fast/dom/node-legacy-event-listener-expected.txt: Removed.
* fast/dom/node-legacy-event-listener.html: Removed.
Drop legacy tests that expect the addEventListener() / removeEventListener()
parameters to be optional.

* fast/dom/eventtarget-api-parameters-expected.txt: Added.
* fast/dom/eventtarget-api-parameters.html: Added.
Add layout test to check that the 2 first parameters of addEventListener()
and removeEventListener() are now mandatory. It also checks that the
second parameter is nullable.

* media/video-remote-control-playpause.html:
Drop useless call to addEventListener() without a listener as it now throws.</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="#trunkLayoutTestsimportedw3cwebplatformtestsXMLHttpRequestinterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediavideoremotecontrolplaypausehtml">trunk/LayoutTests/media/video-remote-control-playpause.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetidl">trunk/Source/WebCore/dom/EventTarget.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomeventtargetapiparametersexpectedtxt">trunk/LayoutTests/fast/dom/eventtarget-api-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomeventtargetapiparametershtml">trunk/LayoutTests/fast/dom/eventtarget-api-parameters.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomWindowwindowlegacyeventlistenerexpectedtxt">trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowlegacyeventlistenerhtml">trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener.html</a></li>
<li><a href="#trunkLayoutTestsfastdomXMLHttpRequestlegacyeventlistenerexpectedtxt">trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomXMLHttpRequestlegacyeventlistenerhtml">trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener.html</a></li>
<li><a href="#trunkLayoutTestsfastdomnodelegacyeventlistenerexpectedtxt">trunk/LayoutTests/fast/dom/node-legacy-event-listener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomnodelegacyeventlistenerhtml">trunk/LayoutTests/fast/dom/node-legacy-event-listener.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/ChangeLog        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-07-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=158008
+
+        Reviewed by Darin Adler.
+
+        * fast/dom/Window/window-legacy-event-listener-expected.txt: Removed.
+        * fast/dom/Window/window-legacy-event-listener.html: Removed.
+        * fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt: Removed.
+        * fast/dom/XMLHttpRequest-legacy-event-listener.html: Removed.
+        * fast/dom/node-legacy-event-listener-expected.txt: Removed.
+        * fast/dom/node-legacy-event-listener.html: Removed.
+        Drop legacy tests that expect the addEventListener() / removeEventListener()
+        parameters to be optional.
+
+        * fast/dom/eventtarget-api-parameters-expected.txt: Added.
+        * fast/dom/eventtarget-api-parameters.html: Added.
+        Add layout test to check that the 2 first parameters of addEventListener()
+        and removeEventListener() are now mandatory. It also checks that the
+        second parameter is nullable.
+
+        * media/video-remote-control-playpause.html:
+        Drop useless call to addEventListener() without a listener as it now throws.
+
</ins><span class="cx"> 2016-07-18  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r203373.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowlegacyeventlistenerexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener-expected.txt (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener-expected.txt        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener-expected.txt        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-Test addEventListener() and removeEventListener() fail silently if arguments are missing.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS window.addEventListener(&quot;foo&quot;) is undefined
-PASS window.removeEventListener(&quot;bar&quot;) is undefined
-PASS window.addEventListener() is undefined
-PASS window.removeEventListener() is undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowlegacyeventlistenerhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener.html (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener.html        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener.html        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;script&gt;
-description(&quot;Test addEventListener() and removeEventListener() fail silently if arguments are missing.&quot;);
-
-shouldBe('window.addEventListener(&quot;foo&quot;)', 'undefined');
-shouldBe('window.removeEventListener(&quot;bar&quot;)', 'undefined');
-
-shouldBe('window.addEventListener()', 'undefined');
-shouldBe('window.removeEventListener()', 'undefined');
-&lt;/script&gt;
-&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastdomXMLHttpRequestlegacyeventlistenerexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-Test addEventListener() and removeEventListener() fail silently if arguments are missing.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS new XMLHttpRequest().addEventListener(&quot;foo&quot;) is undefined
-PASS new XMLHttpRequest().removeEventListener(&quot;bar&quot;) is undefined
-PASS new XMLHttpRequest().addEventListener() is undefined
-PASS new XMLHttpRequest().removeEventListener() is undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastdomXMLHttpRequestlegacyeventlistenerhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener.html (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener.html        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener.html        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;script&gt;
-description(&quot;Test addEventListener() and removeEventListener() fail silently if arguments are missing.&quot;);
-
-shouldBe('new XMLHttpRequest().addEventListener(&quot;foo&quot;)', 'undefined');
-shouldBe('new XMLHttpRequest().removeEventListener(&quot;bar&quot;)', 'undefined');
-
-shouldBe('new XMLHttpRequest().addEventListener()', 'undefined');
-shouldBe('new XMLHttpRequest().removeEventListener()', 'undefined');
-&lt;/script&gt;
-&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastdomeventtargetapiparametersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/eventtarget-api-parameters-expected.txt (0 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/eventtarget-api-parameters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/eventtarget-api-parameters-expected.txt        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+Tests that the 2 first parameters of addEventListener() / removeEventListener() are mandatory.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS addEventListener() threw exception TypeError: Not enough arguments.
+PASS addEventListener('load') threw exception TypeError: Not enough arguments.
+PASS removeEventListener() threw exception TypeError: Not enough arguments.
+PASS removeEventListener('load') threw exception TypeError: Not enough arguments.
+PASS addEventListener('load', null) did not throw exception.
+PASS addEventListener('load', undefined) did not throw exception.
+PASS removeEventListener('load', null) did not throw exception.
+PASS removeEventListener('load', undefined) did not throw exception.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomeventtargetapiparametershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/eventtarget-api-parameters.html (0 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/eventtarget-api-parameters.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/eventtarget-api-parameters.html        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!DOCTYPE hml&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Tests that the 2 first parameters of addEventListener() / removeEventListener() are mandatory.&quot;);
+
+shouldThrow(&quot;addEventListener()&quot;);
+shouldThrow(&quot;addEventListener('load')&quot;);
+shouldThrow(&quot;removeEventListener()&quot;);
+shouldThrow(&quot;removeEventListener('load')&quot;);
+
+// The second parameter should be nullable (no exception thrown).
+shouldNotThrow(&quot;addEventListener('load', null)&quot;);
+shouldNotThrow(&quot;addEventListener('load', undefined)&quot;);
+shouldNotThrow(&quot;removeEventListener('load', null)&quot;);
+shouldNotThrow(&quot;removeEventListener('load', undefined)&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomnodelegacyeventlistenerexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/dom/node-legacy-event-listener-expected.txt (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/node-legacy-event-listener-expected.txt        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/node-legacy-event-listener-expected.txt        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-Test addEventListener() and removeEventListener() fail silently if arguments are missing.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS document.addEventListener(&quot;foo&quot;) is undefined
-PASS document.removeEventListener(&quot;bar&quot;) is undefined
-PASS document.addEventListener() is undefined
-PASS document.removeEventListener() is undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastdomnodelegacyeventlistenerhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/dom/node-legacy-event-listener.html (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/node-legacy-event-listener.html        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/node-legacy-event-listener.html        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;script&gt;
-description(&quot;Test addEventListener() and removeEventListener() fail silently if arguments are missing.&quot;);
-
-shouldBe('document.addEventListener(&quot;foo&quot;)', 'undefined');
-shouldBe('document.removeEventListener(&quot;bar&quot;)', 'undefined');
-
-shouldBe('document.addEventListener()', 'undefined');
-shouldBe('document.removeEventListener()', 'undefined');
-&lt;/script&gt;
-&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-07-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=158008
+
+        Reviewed by Darin Adler.
+
+        Rebaseline several W3C tests now that more checks are passing.
+
+        * web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
+        * web-platform-tests/dom/interfaces-expected.txt:
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
</ins><span class="cx"> 2016-07-18  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Streams API] ReadableStream should throw a RangeError in case of NaN highWaterMark
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsXMLHttpRequestinterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -29,13 +29,9 @@
</span><span class="cx"> PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property &quot;ontimeout&quot; with the proper type (5) 
</span><span class="cx"> PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property &quot;onloadend&quot; with the proper type (6) 
</span><span class="cx"> PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError 
</span><span class="cx"> PASS XMLHttpRequest interface: existence and properties of interface object 
</span><span class="lines">@@ -114,13 +110,9 @@
</span><span class="cx"> PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property &quot;ontimeout&quot; with the proper type (5) 
</span><span class="cx"> PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property &quot;onloadend&quot; with the proper type (6) 
</span><span class="cx"> PASS EventTarget interface: new XMLHttpRequest() must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new XMLHttpRequest() must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new XMLHttpRequest() must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on new XMLHttpRequest() with too few arguments must throw TypeError 
</span><span class="cx"> PASS FormData interface: existence and properties of interface object 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -437,13 +437,9 @@
</span><span class="cx"> PASS Node interface: new Document() must inherit property &quot;removeChild&quot; with the proper type (45) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on new Document() with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: new Document() must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on new Document() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new Document() must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on new Document() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new Document() must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on new Document() with too few arguments must throw TypeError 
</span><span class="cx"> PASS XMLDocument interface: existence and properties of interface object 
</span><span class="lines">@@ -607,13 +603,9 @@
</span><span class="cx"> PASS Node interface: xmlDoc must inherit property &quot;removeChild&quot; with the proper type (45) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on xmlDoc with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: xmlDoc must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: xmlDoc must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: xmlDoc must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on xmlDoc with too few arguments must throw TypeError 
</span><span class="cx"> PASS DOMImplementation interface: existence and properties of interface object 
</span><span class="lines">@@ -737,13 +729,9 @@
</span><span class="cx"> PASS Node interface: document.doctype must inherit property &quot;removeChild&quot; with the proper type (45) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on document.doctype with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: document.doctype must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.doctype with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.doctype with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.doctype must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.doctype with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.doctype with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.doctype must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on document.doctype with too few arguments must throw TypeError 
</span><span class="cx"> PASS DocumentFragment interface: existence and properties of interface object 
</span><span class="lines">@@ -853,13 +841,9 @@
</span><span class="cx"> PASS Node interface: document.createDocumentFragment() must inherit property &quot;removeChild&quot; with the proper type (45) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on document.createDocumentFragment() with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: document.createDocumentFragment() must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createDocumentFragment() must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createDocumentFragment() must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on document.createDocumentFragment() with too few arguments must throw TypeError 
</span><span class="cx"> PASS ShadowRoot interface: existence and properties of interface object 
</span><span class="lines">@@ -1100,13 +1084,9 @@
</span><span class="cx"> PASS Node interface: element must inherit property &quot;removeChild&quot; with the proper type (45) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on element with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: element must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on element with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: element must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on element with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: element must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on element with too few arguments must throw TypeError 
</span><span class="cx"> PASS NamedNodeMap interface: existence and properties of interface object 
</span><span class="lines">@@ -1281,13 +1261,9 @@
</span><span class="cx"> PASS Node interface: document.createTextNode(&quot;abc&quot;) must inherit property &quot;removeChild&quot; with the proper type (45) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on document.createTextNode(&quot;abc&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: document.createTextNode(&quot;abc&quot;) must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createTextNode(&quot;abc&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createTextNode(&quot;abc&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createTextNode(&quot;abc&quot;) must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createTextNode(&quot;abc&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createTextNode(&quot;abc&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createTextNode(&quot;abc&quot;) must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on document.createTextNode(&quot;abc&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS ProcessingInstruction interface: existence and properties of interface object 
</span><span class="lines">@@ -1395,13 +1371,9 @@
</span><span class="cx"> PASS Node interface: xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) must inherit property &quot;removeChild&quot; with the proper type (45) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on xmlDoc.createProcessingInstruction(&quot;abc&quot;, &quot;def&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS Comment interface: existence and properties of interface object 
</span><span class="lines">@@ -1507,13 +1479,9 @@
</span><span class="cx"> PASS Node interface: document.createComment(&quot;abc&quot;) must inherit property &quot;removeChild&quot; with the proper type (45) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on document.createComment(&quot;abc&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: document.createComment(&quot;abc&quot;) must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createComment(&quot;abc&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createComment(&quot;abc&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createComment(&quot;abc&quot;) must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createComment(&quot;abc&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createComment(&quot;abc&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createComment(&quot;abc&quot;) must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on document.createComment(&quot;abc&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS Range interface: existence and properties of interface object 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -418,13 +418,9 @@
</span><span class="cx"> PASS Node interface: iframe.contentDocument must inherit property &quot;removeChild&quot; with the proper type (43) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on iframe.contentDocument with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: iframe.contentDocument must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on iframe.contentDocument with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: iframe.contentDocument must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on iframe.contentDocument with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: iframe.contentDocument must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on iframe.contentDocument with too few arguments must throw TypeError 
</span><span class="cx"> PASS Document must be primary interface of new Document() 
</span><span class="lines">@@ -724,13 +720,9 @@
</span><span class="cx"> PASS Node interface: new Document() must inherit property &quot;removeChild&quot; with the proper type (43) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on new Document() with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: new Document() must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new Document() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new Document() must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new Document() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new Document() must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on new Document() with too few arguments must throw TypeError 
</span><span class="cx"> FAIL XMLDocument interface: operation load(DOMString) assert_own_property: interface prototype object missing non-static operation expected property &quot;load&quot; missing
</span><span class="lines">@@ -1033,13 +1025,9 @@
</span><span class="cx"> PASS Node interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;removeChild&quot; with the proper type (43) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on document.implementation.createDocument(null, &quot;&quot;, null) with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.implementation.createDocument(null, &quot;&quot;, null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.implementation.createDocument(null, &quot;&quot;, null) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.implementation.createDocument(null, &quot;&quot;, null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.implementation.createDocument(null, &quot;&quot;, null) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on document.implementation.createDocument(null, &quot;&quot;, null) with too few arguments must throw TypeError 
</span><span class="cx"> FAIL MouseEvent interface: attribute region assert_true: The prototype object must have a property &quot;region&quot; expected true got false
</span><span class="lines">@@ -1465,13 +1453,9 @@
</span><span class="cx"> PASS Node interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;removeChild&quot; with the proper type (43) 
</span><span class="cx"> PASS Node interface: calling removeChild(Node) on document.createElement(&quot;noscript&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;noscript&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;noscript&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;noscript&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;noscript&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on document.createElement(&quot;noscript&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS HTMLUnknownElement interface: existence and properties of interface object 
</span><span class="lines">@@ -2441,13 +2425,9 @@
</span><span class="cx"> FAIL MediaController interface: new MediaController() must inherit property &quot;onratechange&quot; with the proper type (27) assert_inherits: property &quot;onratechange&quot; not found in prototype chain
</span><span class="cx"> FAIL MediaController interface: new MediaController() must inherit property &quot;onvolumechange&quot; with the proper type (28) assert_inherits: property &quot;onvolumechange&quot; not found in prototype chain
</span><span class="cx"> PASS EventTarget interface: new MediaController() must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new MediaController() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new MediaController() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new MediaController() must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new MediaController() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new MediaController() with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new MediaController() must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on new MediaController() with too few arguments must throw TypeError 
</span><span class="cx"> PASS TextTrackList interface: existence and properties of interface object 
</span><span class="lines">@@ -2469,13 +2449,9 @@
</span><span class="cx"> PASS TextTrackList interface: document.createElement(&quot;video&quot;).textTracks must inherit property &quot;onaddtrack&quot; with the proper type (4) 
</span><span class="cx"> PASS TextTrackList interface: document.createElement(&quot;video&quot;).textTracks must inherit property &quot;onremovetrack&quot; with the proper type (5) 
</span><span class="cx"> PASS EventTarget interface: document.createElement(&quot;video&quot;).textTracks must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;video&quot;).textTracks with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;video&quot;).textTracks with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createElement(&quot;video&quot;).textTracks must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;video&quot;).textTracks with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;video&quot;).textTracks with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createElement(&quot;video&quot;).textTracks must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on document.createElement(&quot;video&quot;).textTracks with too few arguments must throw TypeError 
</span><span class="cx"> PASS TextTrack interface: existence and properties of interface object 
</span><span class="lines">@@ -2514,13 +2490,9 @@
</span><span class="cx"> PASS TextTrack interface: calling removeCue(TextTrackCue) on document.createElement(&quot;track&quot;).track with too few arguments must throw TypeError 
</span><span class="cx"> PASS TextTrack interface: document.createElement(&quot;track&quot;).track must inherit property &quot;oncuechange&quot; with the proper type (10) 
</span><span class="cx"> PASS EventTarget interface: document.createElement(&quot;track&quot;).track must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;track&quot;).track with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;track&quot;).track with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createElement(&quot;track&quot;).track must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;track&quot;).track with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement(&quot;track&quot;).track with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: document.createElement(&quot;track&quot;).track must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on document.createElement(&quot;track&quot;).track with too few arguments must throw TypeError 
</span><span class="cx"> PASS TextTrackCueList interface: existence and properties of interface object 
</span><span class="lines">@@ -5694,13 +5666,9 @@
</span><span class="cx"> PASS Window interface: window must inherit property &quot;sessionStorage&quot; with the proper type (123) 
</span><span class="cx"> PASS Window interface: window must inherit property &quot;localStorage&quot; with the proper type (124) 
</span><span class="cx"> PASS EventTarget interface: window must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: window must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: window must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on window with too few arguments must throw TypeError 
</span><span class="cx"> PASS BarProp interface: existence and properties of interface object 
</span><span class="lines">@@ -5859,13 +5827,9 @@
</span><span class="cx"> PASS ApplicationCache interface: window.applicationCache must inherit property &quot;oncached&quot; with the proper type (16) 
</span><span class="cx"> PASS ApplicationCache interface: window.applicationCache must inherit property &quot;onobsolete&quot; with the proper type (17) 
</span><span class="cx"> PASS EventTarget interface: window.applicationCache must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window.applicationCache with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window.applicationCache with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: window.applicationCache must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window.applicationCache with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window.applicationCache with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: window.applicationCache must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on window.applicationCache with too few arguments must throw TypeError 
</span><span class="cx"> PASS ErrorEvent interface: existence and properties of interface object 
</span><span class="lines">@@ -6076,13 +6040,9 @@
</span><span class="cx"> PASS WebSocket interface: new WebSocket(&quot;ws://foo&quot;) must inherit property &quot;send&quot; with the proper type (18) 
</span><span class="cx"> PASS WebSocket interface: calling send(ArrayBufferView) on new WebSocket(&quot;ws://foo&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: new WebSocket(&quot;ws://foo&quot;) must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><del>-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new WebSocket(&quot;ws://foo&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new WebSocket(&quot;ws://foo&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new WebSocket(&quot;ws://foo&quot;) must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><del>-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new WebSocket(&quot;ws://foo&quot;) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new WebSocket(&quot;ws://foo&quot;) with too few arguments must throw TypeError 
</ins><span class="cx"> PASS EventTarget interface: new WebSocket(&quot;ws://foo&quot;) must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on new WebSocket(&quot;ws://foo&quot;) with too few arguments must throw TypeError 
</span><span class="cx"> PASS CloseEvent interface: existence and properties of interface object 
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideoremotecontrolplaypausehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-remote-control-playpause.html (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-remote-control-playpause.html        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/media/video-remote-control-playpause.html        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -131,7 +131,6 @@
</span><span class="cx">                     video.addEventListener('playing', playing);
</span><span class="cx">                     video.addEventListener('pause', pause);
</span><span class="cx">                     video.addEventListener('seeked', seeked);
</span><del>-                    video.addEventListener('ended');
</del><span class="cx">                     video.src = findMediaFile(&quot;video&quot;, &quot;content/test&quot;);
</span><span class="cx">                 }
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/Source/WebCore/ChangeLog        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-07-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=158008
+
+        Reviewed by Darin Adler.
+
+        The 2 first parameters to addEventListener() / removeEventListener() should be
+        mandatory:
+        - https://dom.spec.whatwg.org/#interface-eventtarget
+
+        Firefox 46 and Chrome 50 both match the specification and throw an exception when those
+        parameters are omitted. However, those parameters were marked as optional in WebKit and
+        the calls were no-ops if those parameters were omitted. This patch aligns our behavior
+        with the specification and other browsers.
+
+        Test: fast/dom/eventtarget-api-parameters.html
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GetFunctionLength): Deleted.
+        * dom/EventTarget.idl:
+
</ins><span class="cx"> 2016-07-18  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r203373.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -1722,9 +1722,6 @@
</span><span class="cx"> {
</span><span class="cx">     my $function = shift;
</span><span class="cx"> 
</span><del>-    # FIXME: EventTarget.addEventListener() / removeEventListener() currently specifies all the parameters as optional.
-    return 2 if $function-&gt;signature-&gt;name eq &quot;addEventListener&quot; || $function-&gt;signature-&gt;name eq &quot;removeEventListener&quot;;
-
</del><span class="cx">     my $length = 0;
</span><span class="cx">     foreach my $parameter (@{$function-&gt;parameters}) {
</span><span class="cx">         # Abort as soon as we find the first optional parameter as no mandatory
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTarget.idl (203376 => 203377)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTarget.idl        2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/Source/WebCore/dom/EventTarget.idl        2016-07-18 22:33:32 UTC (rev 203377)
</span><span class="lines">@@ -31,9 +31,8 @@
</span><span class="cx">     [ImplementedAs=removeEventListenerForBindings] void removeEventListener([AtomicString] DOMString type, EventListener? listener, optional EventListenerOptions options);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    // FIXME: The 'type' and 'listener' parameters should not be optional.
-    [ObjCLegacyUnnamedParameters, ImplementedAs=addEventListenerForBindings] void addEventListener([AtomicString] optional DOMString type = &quot;undefined&quot;, optional EventListener? listener, optional boolean useCapture = false);
-    [ObjCLegacyUnnamedParameters, ImplementedAs=removeEventListenerForBindings] void removeEventListener([AtomicString] optional DOMString type = &quot;undefined&quot;, optional EventListener? listener, optional boolean useCapture = false);
</del><ins>+    [ObjCLegacyUnnamedParameters, ImplementedAs=addEventListenerForBindings] void addEventListener([AtomicString] DOMString type, EventListener? listener, optional boolean useCapture = false);
+    [ObjCLegacyUnnamedParameters, ImplementedAs=removeEventListenerForBindings] void removeEventListener([AtomicString] DOMString type, EventListener? listener, optional boolean useCapture = false);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: event should not be nullable.
</span><span class="cx">     [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event? event);
</span></span></pre>
</div>
</div>

</body>
</html>