[webkit-changes] cvs commit:
WebCore/layout-tests/dom/html/level2/events
dispatchEvent08.js dispatchEvent09.js dispatchEvent10.js
dispatchEvent11-expected.txt dispatchEvent11.js
dispatchEvent12-expected.txt dispatchEvent12.js
dispatchEvent13-expected.txt dispatchEvent13.js
Darin
darin at opensource.apple.com
Wed Aug 17 14:08:21 PDT 2005
darin 05/08/17 14:08:21
Modified: . ChangeLog
layout-tests/dom/html/level2/events dispatchEvent08.js
dispatchEvent09.js dispatchEvent10.js
dispatchEvent11-expected.txt dispatchEvent11.js
dispatchEvent12-expected.txt dispatchEvent12.js
dispatchEvent13-expected.txt dispatchEvent13.js
Log:
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.
Revision Changes Path
1.4594 +18 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4593
retrieving revision 1.4594
diff -u -r1.4593 -r1.4594
--- ChangeLog 17 Aug 2005 20:12:11 -0000 1.4593
+++ ChangeLog 17 Aug 2005 21:08:09 -0000 1.4594
@@ -1,3 +1,21 @@
+2005-08-17 Curt Arnold <curt.arnold at 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 at apple.com>
Reviewed by rjw
1.2 +1 -1 WebCore/layout-tests/dom/html/level2/events/dispatchEvent08.js
Index: dispatchEvent08.js
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent08.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dispatchEvent08.js 26 Jul 2005 08:35:13 -0000 1.1
+++ dispatchEvent08.js 17 Aug 2005 21:08:17 -0000 1.2
@@ -105,7 +105,7 @@
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);
1.2 +1 -1 WebCore/layout-tests/dom/html/level2/events/dispatchEvent09.js
Index: dispatchEvent09.js
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent09.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dispatchEvent09.js 26 Jul 2005 08:35:13 -0000 1.1
+++ dispatchEvent09.js 17 Aug 2005 21:08:17 -0000 1.2
@@ -105,7 +105,7 @@
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);
1.2 +2 -2 WebCore/layout-tests/dom/html/level2/events/dispatchEvent10.js
Index: dispatchEvent10.js
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent10.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dispatchEvent10.js 26 Jul 2005 08:35:13 -0000 1.1
+++ dispatchEvent10.js 17 Aug 2005 21:08:18 -0000 1.2
@@ -105,8 +105,8 @@
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);
1.4 +2 -3 WebCore/layout-tests/dom/html/level2/events/dispatchEvent11-expected.txt
Index: dispatchEvent11-expected.txt
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent11-expected.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dispatchEvent11-expected.txt 14 Aug 2005 08:28:01 -0000 1.3
+++ dispatchEvent11-expected.txt 17 Aug 2005 21:08:18 -0000 1.4
@@ -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
1.2 +2 -2 WebCore/layout-tests/dom/html/level2/events/dispatchEvent11.js
Index: dispatchEvent11.js
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent11.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dispatchEvent11.js 26 Jul 2005 08:35:13 -0000 1.1
+++ dispatchEvent11.js 17 Aug 2005 21:08:18 -0000 1.2
@@ -101,8 +101,8 @@
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);
1.4 +3 -2 WebCore/layout-tests/dom/html/level2/events/dispatchEvent12-expected.txt
Index: dispatchEvent12-expected.txt
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent12-expected.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dispatchEvent12-expected.txt 14 Aug 2005 08:28:01 -0000 1.3
+++ dispatchEvent12-expected.txt 17 Aug 2005 21:08:18 -0000 1.4
@@ -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.
1.2 +151 -124 WebCore/layout-tests/dom/html/level2/events/dispatchEvent12.js
Index: dispatchEvent12.js
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent12.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dispatchEvent12.js 26 Jul 2005 08:35:13 -0000 1.1
+++ dispatchEvent12.js 17 Aug 2005 21:08:18 -0000 1.2
@@ -1,124 +1,151 @@
-
-/*
-Copyright é 2001-2004 World Wide Web Consortium,
-(Massachusetts Institute of Technology, European Research Consortium
-for Informatics and Mathematics, Keio University). All
-Rights Reserved. This work is distributed under the W3Cî Software License [1] in the
-hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
-*/
-
-
-
- /**
- * Gets URI that identifies the test.
- * @return uri identifier of test
- */
-function getTargetURI() {
- return "http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent12";
- }
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-// This function is called by the testing framework before
-// running the test suite.
-//
-// If there are no configuration exceptions, asynchronous
-// document loading is started. Otherwise, the status
-// is set to complete and the exception is immediately
-// raised when entering the body of the test.
-//
-function setUpPage() {
- setUpPageStatus = 'running';
- try {
- //
- // creates test document builder, may throw exception
- //
- builder = createConfiguredBuilder();
-
- docsLoaded = 0;
-
- var docRef = null;
- if (typeof(this.doc) != 'undefined') {
- docRef = this.doc;
- }
- docsLoaded += preload(docRef, "doc", "hc_staff");
-
- if (docsLoaded == 1) {
- setUpPage = 'complete';
- }
- } catch(ex) {
- catchInitializationError(builder, ex);
- setUpPage = 'complete';
- }
-}
-
-
-
-//
-// This method is called on the completion of
-// each asychronous load started in setUpTests.
-//
-// When every synchronous loaded document has completed,
-// the page status is changed which allows the
-// body of the test to be executed.
-function loadComplete() {
- if (++docsLoaded == 1) {
- setUpPageStatus = 'complete';
- }
-}
-
-//EventMonitor's require a document level variable named monitor
-var monitor;
-
-/**
-*
-A monitor is added, multiple calls to removeEventListener
-are mde with similar but not identical arguments, and an event is dispatched.
-The monitor should recieve handleEvent calls.
-
-* @author Curt Arnold
-* @see http://www.w3.org/TR/DOM-Level-2-Events/events#Events-EventTarget-dispatchEvent
-* @see http://www.w3.org/TR/DOM-Level-2-Events/events#xpointer(id('Events-EventTarget-dispatchEvent')/raises/exception[@name='EventException']/descr/p[substring-before(.,':')='UNSPECIFIED_EVENT_TYPE_ERR'])
-*/
-function dispatchEvent12() {
- var success;
- if(checkInitialization(builder, "dispatchEvent12") != null) return;
- var doc;
- var target;
- var evt;
- var preventDefault;
- monitor = new EventMonitor();
-
- other = new EventMonitor();
-
- var events = new Array();
-
-
- var docRef = null;
- if (typeof(this.doc) != 'undefined') {
- docRef = this.doc;
- }
- doc = load(docRef, "doc", "hc_staff");
- doc.addEventListener("foo",monitor,false);
- doc.removeEventListener("foo", monitor.handleEvent, true);
- doc.removeEventListener("food", monitor.handleEvent, false);
- doc.removeEventListener("foo", other.handleEvent, false);
- evt = doc.createEvent("Events");
- evt.initEvent("foo",true,false);
- preventDefault = doc.dispatchEvent(evt);
- events = monitor.allEvents;
-assertSize("eventCount",1,events);
-
-}
-
-
-
-
-function runTest() {
- dispatchEvent12();
-}
+
+/*
+Copyright é 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3Cî Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//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
+are mde with similar but not identical arguments, and an event is dispatched.
+The monitor should recieve handleEvent calls.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/DOM-Level-2-Events/events#Events-EventTarget-dispatchEvent
+* @see http://www.w3.org/TR/DOM-Level-2-Events/events#xpointer(id('Events-EventTarget-dispatchEvent')/raises/exception[@name='EventException']/descr/p[substring-before(.,':')='UNSPECIFIED_EVENT_TYPE_ERR'])
+*/
+function dispatchEvent12() {
+ var success;
+ if(checkInitialization(builder, "dispatchEvent12") != null) return;
+ var doc;
+ var target;
+ var evt;
+ var preventDefault;
+ monitor = new EventMonitor();
+
+ other = new EventMonitor();
+
+ var events = new Array();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc.addEventListener("foo", monitor.handleEvent, false);
+ doc.removeEventListener("foo", monitor.handleEvent, true);
+ doc.removeEventListener("food", monitor.handleEvent, false);
+ doc.removeEventListener("foo", other.handleEvent, false);
+ evt = doc.createEvent("Events");
+ evt.initEvent("foo",true,false);
+ preventDefault = doc.dispatchEvent(evt);
+ events = monitor.allEvents;
+assertSize("eventCount",1,events);
+
+}
+
+
+
+
+function runTest() {
+ dispatchEvent12();
+}
1.4 +2 -3 WebCore/layout-tests/dom/html/level2/events/dispatchEvent13-expected.txt
Index: dispatchEvent13-expected.txt
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent13-expected.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dispatchEvent13-expected.txt 14 Aug 2005 08:28:01 -0000 1.3
+++ dispatchEvent13-expected.txt 17 Aug 2005 21:08:18 -0000 1.4
@@ -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
1.2 +2 -2 WebCore/layout-tests/dom/html/level2/events/dispatchEvent13.js
Index: dispatchEvent13.js
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/events/dispatchEvent13.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dispatchEvent13.js 26 Jul 2005 08:35:13 -0000 1.1
+++ dispatchEvent13.js 17 Aug 2005 21:08:18 -0000 1.2
@@ -192,8 +192,8 @@
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);
More information about the webkit-changes
mailing list