Reviewed by Ada.
Added a new test to make sure that eventSender.mouseClick works
correctly.
* fast/events/click-count-expected.txt: Added.
* fast/events/click-count.html: Added.
Updated results for some tests that depended on the broken version of
eventSender.mouseClick.
* fast/events/objc-event-api-expected.txt:
* fast/forms/focus-selection-input-expected.txt:
* fast/forms/focus-selection-textarea-expected.txt:
WebKitTools:
Reviewed by Ada.
Make eventSender.mouseClick actually send a mouse up event.
* DumpRenderTree/EventSendingController.m:
(-[EventSendingController mouseClick]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20386
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-03-22 Adam Roben <aroben@apple.com>
+
+ Reviewed by Ada.
+
+ Added a new test to make sure that eventSender.mouseClick works
+ correctly.
+
+ * fast/events/click-count-expected.txt: Added.
+ * fast/events/click-count.html: Added.
+
+ Updated results for some tests that depended on the broken version of
+ eventSender.mouseClick.
+
+ * fast/events/objc-event-api-expected.txt:
+ * fast/forms/focus-selection-input-expected.txt:
+ * fast/forms/focus-selection-textarea-expected.txt:
+
2007-03-21 Mitz Pettel <mitz@webkit.org>
Reviewed by Darin.
--- /dev/null
+Click inside this div
+Clicking 1 times
+[Mouse Down] Button: 0 Click Count: 1
+[Mouse Up] Button: 0 Click Count: 1
+[Mouse Click] Button: 0 Click Count: 1
+Clicking 2 times
+[Mouse Down] Button: 0 Click Count: 1
+[Mouse Up] Button: 0 Click Count: 1
+[Mouse Click] Button: 0 Click Count: 1
+[Mouse Down] Button: 0 Click Count: 2
+[Mouse Up] Button: 0 Click Count: 2
+[Mouse Click] Button: 0 Click Count: 2
+[Mouse Double Click] Button: 0 Click Count: 2
+Clicking 3 times
+[Mouse Down] Button: 0 Click Count: 1
+[Mouse Up] Button: 0 Click Count: 1
+[Mouse Click] Button: 0 Click Count: 1
+[Mouse Down] Button: 0 Click Count: 2
+[Mouse Up] Button: 0 Click Count: 2
+[Mouse Click] Button: 0 Click Count: 2
+[Mouse Double Click] Button: 0 Click Count: 2
+[Mouse Down] Button: 0 Click Count: 3
+[Mouse Up] Button: 0 Click Count: 3
+[Mouse Click] Button: 0 Click Count: 3
+Clicking 4 times
+[Mouse Down] Button: 0 Click Count: 1
+[Mouse Up] Button: 0 Click Count: 1
+[Mouse Click] Button: 0 Click Count: 1
+[Mouse Down] Button: 0 Click Count: 2
+[Mouse Up] Button: 0 Click Count: 2
+[Mouse Click] Button: 0 Click Count: 2
+[Mouse Double Click] Button: 0 Click Count: 2
+[Mouse Down] Button: 0 Click Count: 3
+[Mouse Up] Button: 0 Click Count: 3
+[Mouse Click] Button: 0 Click Count: 3
+[Mouse Down] Button: 0 Click Count: 4
+[Mouse Up] Button: 0 Click Count: 4
+[Mouse Click] Button: 0 Click Count: 4
+Clicking 5 times
+[Mouse Down] Button: 0 Click Count: 1
+[Mouse Up] Button: 0 Click Count: 1
+[Mouse Click] Button: 0 Click Count: 1
+[Mouse Down] Button: 0 Click Count: 2
+[Mouse Up] Button: 0 Click Count: 2
+[Mouse Click] Button: 0 Click Count: 2
+[Mouse Double Click] Button: 0 Click Count: 2
+[Mouse Down] Button: 0 Click Count: 3
+[Mouse Up] Button: 0 Click Count: 3
+[Mouse Click] Button: 0 Click Count: 3
+[Mouse Down] Button: 0 Click Count: 4
+[Mouse Up] Button: 0 Click Count: 4
+[Mouse Click] Button: 0 Click Count: 4
+[Mouse Down] Button: 0 Click Count: 5
+[Mouse Up] Button: 0 Click Count: 5
+[Mouse Click] Button: 0 Click Count: 5
+
+
--- /dev/null
+<html>
+<head>
+<script>
+function log(string)
+{
+ document.getElementById('output').innerHTML += string;
+}
+
+function mouseDown(evt)
+{
+ log("<span style='color:green'>[Mouse Down]</span> Button: " + evt.button + " Click Count: " + evt.detail + "<br>");
+}
+
+function mouseUp(evt)
+{
+ log("<span style='color:green'>[Mouse Up]</span> Button: " + evt.button + " Click Count: " + evt.detail + "<br>");
+}
+
+function mouseClick(evt)
+{
+ log("<span style='color:green'>[Mouse Click]</span> Button: " + evt.button + " Click Count: " + evt.detail + "<br>");
+}
+
+function mouseDoubleClick(evt)
+{
+ log("<span style='color:green'>[Mouse Double Click]</span> Button: " + evt.button + " Click Count: " + evt.detail + "<br>");
+}
+
+function test()
+{
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ }
+ if (window.eventSender) {
+ var testEle = document.getElementById("testDiv");
+ eventSender.mouseMoveTo(testEle.offsetLeft+testEle.offsetWidth/2, testEle.offsetTop+testEle.offsetHeight/2);
+ testClick();
+ }
+}
+
+var clickCount = 1;
+function testClick()
+{
+ if (clickCount > 5) {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ return;
+ }
+ log("Clicking " + clickCount + " times<br>");
+ for (var click = 0; click < clickCount; click++)
+ eventSender.mouseClick();
+ clickCount++;
+ setTimeout(testClick, 1000);
+}
+
+</script>
+</head>
+<body onload="test()">
+<div id="testDiv" style="-webkit-user-select: none; border:1px solid red" onmousedown="mouseDown(event)" onmouseup="mouseUp(event)" onclick="mouseClick(event)" ondblclick="mouseDoubleClick(event)">Click inside this div</div>
+<p id="output">
+</p>
eventPhase: 3
bubbles: 1
cancelable: 1
+event type: mouseup
+ target: <div>
+ eventPhase: 3
+ bubbles: 1
+ cancelable: 1
+ detail: 2
+ view: OK (document: OK)
+ button: 0
+ clientX: 400
+ clientY: 150
+ screenX: -9600
+ screenY: -9850
+ modifier keys: c:0 s:0 a:0 m:0
+event type: click
+ target: <div>
+ eventPhase: 3
+ bubbles: 1
+ cancelable: 1
+ detail: 2
+ view: OK (document: OK)
+ button: 0
+ clientX: 400
+ clientY: 150
+ screenX: -9600
+ screenY: -9850
+ modifier keys: c:0 s:0 a:0 m:0
+event type: dblclick
+ target: <div>
+ eventPhase: 3
+ bubbles: 1
+ cancelable: 1
+ detail: 2
+ view: OK (document: OK)
+ button: 0
+ clientX: 400
+ clientY: 150
+ screenX: -9600
+ screenY: -9850
+ modifier keys: c:0 s:0 a:0 m:0
+event type: mousemove
+ target: <div>
+ eventPhase: 3
+ bubbles: 1
+ cancelable: 0
+ detail: 0
+ view: OK (document: OK)
+ button: 0
+ clientX: 400
+ clientY: 150
+ screenX: -9600
+ screenY: -9850
+ modifier keys: c:0 s:0 a:0 m:0
event type: mousedown
target: <div>
eventPhase: 3
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
<input type="text"> focus selection
This test checks whether the selection is restored, cleared, or set to the full range when using different ways to focus a text field. These results all match Mozilla, except test 6, which selects the whole field contents to match all other cases of keyboard focus. When running manually, please follow the steps below. In the test harness, the test runs automatically.
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
<textarea> focus selection
This test checks whether the selection is restored, cleared, or set to the full range when using different ways to focus a text area. These results all match Mozilla. When running manually, please follow the steps below. In the test harness, the test runs automatically.
+2007-03-22 Adam Roben <aroben@apple.com>
+
+ Reviewed by Ada.
+
+ Make eventSender.mouseClick actually send a mouse up event.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController mouseClick]):
+
2007-03-19 David Hyatt <hyatt@apple.com>
Update the minimum font size pref to match the actual default setting in Safari. It should have been 1
eventNumber:++eventNumber
clickCount:clickCount
pressure:0.0];
- [NSApp postEvent:mouseUpEvent atStart:NO];
[subView mouseDown:mouseDownEvent];
+ [subView mouseUp:mouseUpEvent];
lastClick = [mouseUpEvent timestamp];
}
}