Opened 9 years ago

Closed 7 years ago

Last modified 5 years ago

#12544 closed defect (fixed)

robot crashes FF4 on mac

Reported by: Douglas Hays Owned by: haysmark
Priority: high Milestone: 1.7.6
Component: TestFramework Version: 1.6.0
Keywords: ff4 Cc:
Blocked By: Blocking:

Description

Run dijit/tests/form/robot/CheckBox_a11y.html on FF4/mac. As soon as I click to Allow the untrusted applet to run, FF4 terminates.

Attachments (1)

applet.png (68.1 KB) - added by haysmark 7 years ago.
True location of applet during test.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 9 years ago by haysmark

My experience is that FF4 does not actually crash, but instead the robot clicks the top-left corner where the close button just so happens to be. When I moved the browser to the right, the browser did not crash, but the tests did not start either.

See: https://support.mozilla.com/en-US/questions/803519

comment:2 Changed 8 years ago by haysmark

Resolution: fixed
Status: newclosed

In [26155]:

Work around Apple bug that causes the robot to not initialize correctly on OS X starting with FF4 and Safari 5.1 (seems to be something Java related that is statically baked into the browser rather than dynamically pulled from the system JVM). Should not affect Windows or Linux machines. Fixes #12544.

comment:3 Changed 8 years ago by haysmark

Milestone: 1.6.21.7

comment:4 Changed 8 years ago by haysmark

In [26177]:

Update robot build script. Refs #12544.

comment:5 Changed 8 years ago by Colin Snover

Well, it’s not clicking the close button any more on my system, but it is still not working on my system, Mac OS 10.6.8. In my case it seems to be clicking right between my first and second monitors. The second monitor is positioned south of the first monitor. It does not matter which monitor the Firefox window is on.

Interestingly, when I ran the Robot in Firefox, then ran the robot in Safari while my Firefox window was still open, it appeared to click *in the Firefox window* in the expected location.

comment:6 Changed 8 years ago by Colin Snover

Resolution: fixed
Status: closedreopened

comment:7 Changed 8 years ago by Chris Mitchell

any updates on this? is this blocker for rc1?

comment:8 Changed 8 years ago by bill

I don't think it's a blocker. Perhaps this error is new, but DOH on FF/mac has never worked. You need to run on FF/win. (I'm talking about the dijit regression tests.)

comment:9 Changed 8 years ago by Chris Mitchell

Priority: highnormal

changing priority to normal to get it off the 1.7 hot list

Changed 7 years ago by haysmark

Attachment: applet.png added

True location of applet during test.

comment:10 Changed 7 years ago by haysmark

Fun fact: Apple added the ability to detach applets from the browser. By holding down shift+command and waving your mouse over an applet, a frame appears. If you drag the frame, it detaches from the browser.

Fun fact: for some reason, this does not quite work for our applet. Instead, you have to move your mouse to the top left of the screen to find it. This position also coincides with the position reported by getLocationOnScreen. See the attached applet.png for details.

Apple made a number of "fixes" related to these issues, there could more more in store:

http://developer.apple.com/library/mac/releasenotes/Java/JavaSnowLeopardUpdate5LeopardUpdate10RN/JavaSnowLeopardUpdate5LeopardUpdate10RN.pdf

comment:11 Changed 7 years ago by haysmark

I still have a ticket open with Mozilla, I moved it to a more visible location:

https://bugzilla.mozilla.org/show_bug.cgi?id=645846

Also, I personally can't open a defect with Apple because I can't sign their NDA, but perhaps someone else can?

comment:12 Changed 7 years ago by haysmark

Resolution: fixed
Status: reopenedclosed

In [28928]:

Fix robot on Macs with multiple monitors. Add more clicks to the top-left of the browser to guarantee focus is restored. Fixes #12544.

comment:13 Changed 7 years ago by bill

Resolution: fixed
Status: closedreopened

This line is wrong because because of the extra parens:

if(e.stopPropagation()){ e.stopPropagation(); }

More importantly, I was getting an error running the dijit regression on IE8 about "console is undefined", but still tracing down when that happens. Does it happen for you?

comment:14 Changed 7 years ago by haysmark

Bill, what extra parens? I don't see a syntax error? Here is the output from jslint for that onmousedown on its own ex nitpicking:

Missing 'use strict' statement.
		if(receivedMouseDown){
line 2 character 12'receivedMouseDown' was used before it was defined.
		if(receivedMouseDown){
line 6 character 16'window' was used before it was defined.
		e = e||window.event;
line 7 character 22Expected '===' and instead saw '=='.
		if(e.screenX == 0||e.clientX == 0){ return; }
line 7 character 38Expected '===' and instead saw '=='.
		if(e.screenX == 0||e.clientX == 0){ return; }
line 10 character 9'robot' was used before it was defined.
		robot._setDocumentBounds(docScreenX, docScreenY);

I'll delete any new console.logs.

comment:15 Changed 7 years ago by bill

That code fails when e.stopPropagation is not defined. Just try running the tests on IE8, both runTests.html and a standalone tests/_base/robot/CrossWindow.html, and you'll see the error.

Last edited 7 years ago by bill (previous) (diff)

comment:16 Changed 7 years ago by haysmark

Resolution: fixed
Status: reopenedclosed

In [28958]:

Remove spurious calls to stopPropagation and console.log. Fixes #12544.

comment:17 Changed 7 years ago by haysmark

I tried CrossWindow? in IE8 mode in IE9 with the fix, it should work now...

comment:18 Changed 7 years ago by bill

Thanks, that's working much better now.

For the record, the problem I listed above was that the if condition (which was clearly trying to test if e has a stopPropagation() method) should have been:

if(e.stopPropagation)

not

if(e.stopPropagation())

The latter if() statement actually calls stopPropagation to evaluate the if()'s condition, and of course it will get an exception if there's no such method.

comment:19 Changed 5 years ago by Bill Keese <bill@…>

In d0b294e62f2a6b9b388e71f9a94ce5e2105dff69/util:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:20 Changed 5 years ago by bill

Milestone: 1.81.7.6
Note: See TracTickets for help on using tickets.