Reviewed and landed by Darin.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Aug 2005 21:08:18 +0000 (21:08 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Aug 2005 21:08:18 +0000 (21:08 +0000)
        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4491
          DOM L2 Events tests using addEventListener broken

        * layout-tests/dom/html/level2/events/dispatchEvent08.js: Updated.
        * layout-tests/dom/html/level2/events/dispatchEvent09.js: Ditto.
        * layout-tests/dom/html/level2/events/dispatchEvent10.js: Ditto.
        * layout-tests/dom/html/level2/events/dispatchEvent11.js: Ditto.
        * layout-tests/dom/html/level2/events/dispatchEvent12.js: Ditto.
        * layout-tests/dom/html/level2/events/dispatchEvent13.js: Ditto.

        * layout-tests/dom/html/level2/events/dispatchEvent11-expected.txt: Now succeeds.
        * layout-tests/dom/html/level2/events/dispatchEvent12-expected.txt: Now fails.
        * layout-tests/dom/html/level2/events/dispatchEvent13-expected.txt: Now succeeds.

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

LayoutTests/dom/html/level2/events/dispatchEvent08.js
LayoutTests/dom/html/level2/events/dispatchEvent09.js
LayoutTests/dom/html/level2/events/dispatchEvent10.js
LayoutTests/dom/html/level2/events/dispatchEvent11-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent11.js
LayoutTests/dom/html/level2/events/dispatchEvent12-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent12.js
LayoutTests/dom/html/level2/events/dispatchEvent13-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent13.js
WebCore/ChangeLog-2005-08-23

index f917f8c5196e6c80eba16af2712b380cf0b5b024..02e3c49503ba16ddc29db57d195494228bb7c789 100644 (file)
@@ -105,7 +105,7 @@ function dispatchEvent08() {
         docRef = this.doc;
       }
       doc = load(docRef, "doc", "hc_staff");
-      doc.addEventListener("foo",monitor,false);
+      doc.addEventListener("foo", monitor.handleEvent, false);
       evt = doc.createEvent("Events");
       evt.initEvent("foo",true,false);
       preventDefault = doc.dispatchEvent(evt);
index 25b62269350951f56806da416accb605629ba2fd..4163afc471063971337258dc456ac2572be4a9ef 100644 (file)
@@ -105,7 +105,7 @@ function dispatchEvent09() {
         docRef = this.doc;
       }
       doc = load(docRef, "doc", "hc_staff");
-      doc.addEventListener("foo",monitor,true);
+      doc.addEventListener("foo", monitor.handleEvent, true);
       evt = doc.createEvent("Events");
       evt.initEvent("foo",true,false);
       preventDefault = doc.dispatchEvent(evt);
index 55173f6f2ddcd02b3a5db259a6c4b8d2a99f5be2..a3a804f19983bfcfd64c6ad85e114b80758cca3a 100644 (file)
@@ -105,8 +105,8 @@ function dispatchEvent10() {
         docRef = this.doc;
       }
       doc = load(docRef, "doc", "hc_staff");
-      doc.addEventListener("foo",monitor,false);
-      doc.addEventListener("foo",monitor,false);
+      doc.addEventListener("foo", monitor.handleEvent, false);
+      doc.addEventListener("foo", monitor.handleEvent, false);
       evt = doc.createEvent("Events");
       evt.initEvent("foo",true,false);
       preventDefault = doc.dispatchEvent(evt);
index b32d33208546898a93ae366686cfb1d006676e77..bfc7703cd83df93c36f21b0e229072c035b457f6 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent11     
-Status:        failure
-Detail:        eventCount: assertEquals failed, actual 1, expected 0.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent11
+Status:        Success
index ba812a6ca4ceac05bdb7d9f0d94bea02196209ac..311b1c70585ce743c373cc4a0ea494c6ae82b166 100644 (file)
@@ -101,8 +101,8 @@ function dispatchEvent11() {
         docRef = this.doc;
       }
       doc = load(docRef, "doc", "hc_staff");
-      doc.addEventListener("foo",monitor,false);
-      doc.addEventListener("foo",monitor,false);
+      doc.addEventListener("foo", monitor.handleEvent, false);
+      doc.addEventListener("foo", monitor.handleEvent, false);
       doc.removeEventListener("foo", monitor.handleEvent, false);
         evt = doc.createEvent("Events");
       evt.initEvent("foo",true,false);
index a241a227534963af1341dc662a647ce333210334..ec930d61f0c365021fe3d7d200ab02781ffddbc7 100644 (file)
@@ -1,2 +1,3 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent12
-Status:        Success
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent12     
+Status:        failure
+Detail:        eventCount: assertEquals failed, actual 0, expected 1.
index 90a7a1871beafe1a98a520f726dc72b880a2e5f7..23dc35f7b0b98ac29f6713894fe2aed747750ff9 100644 (file)
@@ -75,6 +75,33 @@ function loadComplete() {
 //EventMonitor's require a document level variable named monitor
 var monitor;
         
+     /**
+      *    Inner class implementation for variable other 
+      */
+var other;
+
+/**
+        * Constructor
+
+        */
+             
+function EventListenerN10035() { 
+           }
+   
+        /**
+         *    
+This method is called whenever an event occurs of the type for which theEventListenerinterface was registered.
+
+         * @param evt 
+TheEventcontains contextual information about the event. It also contains thestopPropagationand preventDefaultmethods which are used in determining the event's flow and default action.
+
+         */
+EventListenerN10035.prototype.handleEvent = function(evt) {
+         //
+         //   bring class variables into function scope
+         //
+        }
+
 /**
 * 
 A monitor is added, multiple calls to removeEventListener
@@ -104,7 +131,7 @@ function dispatchEvent12() {
         docRef = this.doc;
       }
       doc = load(docRef, "doc", "hc_staff");
-      doc.addEventListener("foo",monitor,false);
+      doc.addEventListener("foo", monitor.handleEvent, false);
       doc.removeEventListener("foo", monitor.handleEvent, true);
         doc.removeEventListener("food", monitor.handleEvent, false);
         doc.removeEventListener("foo", other.handleEvent, false);
index 1bb095b864244034d93c6b317415e7adeb499eff..e0cbd7f3ea8af27bc6716e0ccce1a4b700ecb643 100644 (file)
@@ -1,3 +1,2 @@
-Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent13     
-Status:        failure
-Detail:        eventCount: assertEquals failed, actual 2, expected 1.
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent13
+Status:        Success
index 4c2e60657e3a304d3b38b2543f1ddf6de687a88e..8d52f9663d6d42b7da920e9daf549c1f92caf856 100644 (file)
@@ -192,8 +192,8 @@ function dispatchEvent13() {
       doc = load(docRef, "doc", "hc_staff");
       listeners[listeners.length] = listener1;
 listeners[listeners.length] = listener2;
-doc.addEventListener("foo",listener1,false);
-      doc.addEventListener("foo",listener2,false);
+doc.addEventListener("foo", listener1.handleEvent, false);
+      doc.addEventListener("foo", listener2.handleEvent, false);
       evt = doc.createEvent("Events");
       evt.initEvent("foo",true,false);
       preventDefault = doc.dispatchEvent(evt);
index 895db11ba5dac5a920ae1f1b42370846193b1431..eb00437982c0f19a5cf7f6cd3f3d5fed7ea674e2 100644 (file)
@@ -1,3 +1,21 @@
+2005-08-17  Curt Arnold  <curt.arnold@mac.com>
+
+        Reviewed and landed by Darin.
+
+        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4491
+          DOM L2 Events tests using addEventListener broken
+
+        * layout-tests/dom/html/level2/events/dispatchEvent08.js: Updated.
+        * layout-tests/dom/html/level2/events/dispatchEvent09.js: Ditto.
+        * layout-tests/dom/html/level2/events/dispatchEvent10.js: Ditto.
+        * layout-tests/dom/html/level2/events/dispatchEvent11.js: Ditto.
+        * layout-tests/dom/html/level2/events/dispatchEvent12.js: Ditto.
+        * layout-tests/dom/html/level2/events/dispatchEvent13.js: Ditto.
+
+        * layout-tests/dom/html/level2/events/dispatchEvent11-expected.txt: Now succeeds.
+        * layout-tests/dom/html/level2/events/dispatchEvent12-expected.txt: Now fails.
+        * layout-tests/dom/html/level2/events/dispatchEvent13-expected.txt: Now succeeds.
+
 2005-08-17  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by rjw