1 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of body > html > foreignObject > svg > #document to 0 of body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of body > html > foreignObject > svg > #document to 0 of body > html > foreignObject > svg > #document toDOMRange:range from 39 of #text > div > div > body > html > foreignObject > svg > #document to 46 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 39 of #text > div > div > body > html > foreignObject > svg > #document to 46 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 35 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 35 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 47 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 47 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 34 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
11 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 34 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 46 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
13 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 46 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 35 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
15 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 35 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 47 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
16 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
17 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 47 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 36 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
18 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
19 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 36 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 48 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
20 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
21 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 48 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 35 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
22 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
23 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 35 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 47 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
24 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
25 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 47 of #text > div > div > body > html > foreignObject > svg > #document toDOMRange:range from 0 of #text > div > div > body > html > foreignObject > svg > #document to 36 of #text > div > div > body > html > foreignObject > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
26 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
30 if (window.layoutTestController)
31 layoutTestController.dumpAsText();
33 function log(string) {
34 var newDiv = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
35 newDiv.textContent = string;
36 document.getElementById('log').appendChild(newDiv);
41 function testClick(x, y, expected) {
42 eventSender.mouseMoveTo(x, y);
43 eventSender.mouseDown();
44 eventSender.mouseUp();
45 if (expected && lastEvent && lastEvent.clientX == x && lastEvent.clientY == y) {
46 log("SUCCESS: click received at: " + x + ", " + y);
47 } else if (!expected && !lastEvent) {
48 log("SUCCESS: click at " + x + ", " + y + " was correctly ignored");
49 } else if (expected && lastEvent) {
50 log("FAILURE: click received at: " + lastEvent.clientX + ", " + lastEvent.clientY + " but it was expected at: " + x + ", " + y);
51 } else if (!expected && lastEvent) {
52 log("FAILURE: UNEXPECTED click received at: " + lastEvent.clientX + ", " + lastEvent.clientY);
53 } else if (expected && !lastEvent) {
54 log("FAILURE: NO click received at: " + x + ", " + y);
61 function gotClick(evt) {
65 function gotMouseEvent(evt, type) {
66 if (!window.layoutTestController)
67 document.getElementById('mouseover-text').textContent = type + " at " + evt.clientX + ", " + evt.clientY;
75 SUCCESS: click at 10, 10 was correctly ignoredSUCCESS: click received at: 30, 100SUCCESS: click at 29, 100 was correctly ignoredSUCCESS: click received at: 30, 50SUCCESS: click at 30, 49 was correctly ignoredSUCCESS: click received at: 30, 150SUCCESS: click at 30, 151 was correctly ignoredSUCCESS: click received at: 300, 100SUCCESS: click at 301, 100 was correctly ignoredSUCCESS: click received at: 300, 50SUCCESS: click at 300, 49 was correctly ignoredSUCCESS: click received at: 300, 150SUCCESS: click at 300, 151 was correctly ignoredSUCCESS: click at 1000, 1000 was correctly ignored
86 if (window.eventSender) {
87 testClick(10, 10, false);
88 testClick(30, 100, true);
89 testClick(29, 100, false);
90 testClick(30, 50, true);
91 testClick(30, 49, false);
92 testClick(30, 150, true);
93 testClick(30, 151, false);
94 testClick(300, 100, true);
95 testClick(301, 100, false);
96 testClick(300, 50, true);
97 testClick(300, 49, false);
98 testClick(300, 150, true);
99 testClick(300, 151, false);
100 testClick(1000, 1000, false);
102 log("ERROR: window.eventSender not found! This test must be run using DumpRenderTree. Mousing over the yellow area will log however.");