The third argument of addEventListener/removeEventListener of PeerConnection should...
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2012 08:23:59 +0000 (08:23 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2012 08:23:59 +0000 (08:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77606

Reviewed by Adam Barth.

Source/WebCore:

This patch corrects a typo in PeerConnection.idl, i.e. [optional] => [Optional].

Test: fast/mediastream/peerconnection-eventlistener-optional-argument.html

* mediastream/PeerConnection.idl:

LayoutTests:

The added test confirms if the third argument of addEventListener() and
removeEventListener() is optional.

* fast/mediastream/peerconnection-eventlistener-optional-argument-expected.txt: Added.
* fast/mediastream/peerconnection-eventlistener-optional-argument.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106539 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/mediastream/peerconnection-eventlistener-optional-argument-expected.txt [new file with mode: 0644]
LayoutTests/fast/mediastream/peerconnection-eventlistener-optional-argument.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/mediastream/PeerConnection.idl

index 0f0713f..ebed4b8 100644 (file)
@@ -1,3 +1,16 @@
+2012-02-02  Kentaro Hara  <haraken@chromium.org>
+
+        The third argument of addEventListener/removeEventListener of PeerConnection should be optional
+        https://bugs.webkit.org/show_bug.cgi?id=77606
+
+        Reviewed by Adam Barth.
+
+        The added test confirms if the third argument of addEventListener() and
+        removeEventListener() is optional.
+
+        * fast/mediastream/peerconnection-eventlistener-optional-argument-expected.txt: Added.
+        * fast/mediastream/peerconnection-eventlistener-optional-argument.html: Added.
+
 2012-02-01  Philippe Normand  <pnormand@igalia.com>
 
         [GStreamer] FFTFrame implementation
diff --git a/LayoutTests/fast/mediastream/peerconnection-eventlistener-optional-argument-expected.txt b/LayoutTests/fast/mediastream/peerconnection-eventlistener-optional-argument-expected.txt
new file mode 100644 (file)
index 0000000..84ac1ab
--- /dev/null
@@ -0,0 +1,15 @@
+This test confirms if the third argument of addEventListener() and removeEventListener() is optional.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS pc.addEventListener("foo", function() {}) is undefined
+PASS pc.addEventListener("foo", function() {}, false) is undefined
+PASS pc.addEventListener("foo", function() {}, true) is undefined
+PASS pc.removeEventListener("foo", function() {}) is undefined
+PASS pc.removeEventListener("foo", function() {}, false) is undefined
+PASS pc.removeEventListener("foo", function() {}, true) is undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/mediastream/peerconnection-eventlistener-optional-argument.html b/LayoutTests/fast/mediastream/peerconnection-eventlistener-optional-argument.html
new file mode 100644 (file)
index 0000000..6175ee7
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+</body>
+<script>
+description("This test confirms if the third argument of addEventListener() and removeEventListener() is optional.");
+
+var pc = new webkitPeerConnection("some.server.com", function() {});
+shouldBe('pc.addEventListener("foo", function() {})', 'undefined');
+shouldBe('pc.addEventListener("foo", function() {}, false)', 'undefined');
+shouldBe('pc.addEventListener("foo", function() {}, true)', 'undefined');
+shouldBe('pc.removeEventListener("foo", function() {})', 'undefined');
+shouldBe('pc.removeEventListener("foo", function() {}, false)', 'undefined');
+shouldBe('pc.removeEventListener("foo", function() {}, true)', 'undefined');
+
+window.successfullyParsed = true;
+
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</html>
index 5093ee8..f0dbcba 100644 (file)
@@ -1,3 +1,16 @@
+2012-02-02  Kentaro Hara  <haraken@chromium.org>
+
+        The third argument of addEventListener/removeEventListener of PeerConnection should be optional
+        https://bugs.webkit.org/show_bug.cgi?id=77606
+
+        Reviewed by Adam Barth.
+
+        This patch corrects a typo in PeerConnection.idl, i.e. [optional] => [Optional].
+
+        Test: fast/mediastream/peerconnection-eventlistener-optional-argument.html
+
+        * mediastream/PeerConnection.idl:
+
 2012-02-02  Rakesh KN  <rakesh.kn@motorola.com>
 
         hidden attribute on <input type=file /> suppresses the file selection dialog
index f9ee192..59d35e3 100644 (file)
@@ -64,10 +64,10 @@ module p2p {
         // EventTarget interface
         void addEventListener(in DOMString type,
                               in EventListener listener,
-                              in [optional] boolean useCapture);
+                              in [Optional] boolean useCapture);
         void removeEventListener(in DOMString type,
                                  in EventListener listener,
-                                 in [optional] boolean useCapture);
+                                 in [Optional] boolean useCapture);
         boolean dispatchEvent(in Event event)
             raises(EventException);
     };