Closed Bug 651534 Opened 13 years ago Closed 11 years ago

permaorange: browser_click_content.js | Test timed out

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: philor, Unassigned)

References

Details

(Whiteboard: [test disabled on Android])

Attachments

(1 file, 1 obsolete file)

TEST-PASS | chrome://mochitests/content/browser/mobile/chrome/browser_click_content.js | URL Matches newly created Tab
TEST-INFO | chrome://mochitests/content/browser/mobile/chrome/browser_click_content.js | Console message: [JavaScript Error: "uncaught exception: waitFor timeout"]
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/mobile/chrome/browser_click_content.js | Test timed out
Not actually Android-specific, n900s do the same thing.
OS: Android → All
Hardware: ARM → All
Attached patch Potential Fix (obsolete) — Splinter Review
I haven't ever seen this happen on desktop, but it seems likely to me its just a timing issue.
Attachment #527684 - Flags: review?(mark.finkle)
Comment on attachment 527684 [details] [diff] [review]
Potential Fix

>-  element.addEventListener("click", clickFired, true);
>+  element.addEventListener("click", function(aEvent) {

You should remove the event handler here using the arguments.callee trick

>+    clickFired(aEvent);
>+    checkClick();
>+  }, true);
> 
>   EventUtils.synthesizeMouseForContent(element, 1, 1, {}, window);
>-  waitFor(checkClick, function() { return isClickFired });
> }
> 
> function checkClick() {
>   ok(isClickFired, "Click handler fired");
>   element.removeEventListener("click", clickFired, true);

This one ^

>-  element.addEventListener("click", clickFired, true);
>+  element.addEventListener("click", function(aEvent) {

Same thing

>+    clickFired(aEvent);
>+    checkPosition();
>+  }, true);
> 
>   let rect = getBoundingContentRect(element);
>   EventUtils.synthesizeMouse(element, 1, rect.height + 10, {}, window);
>-  waitFor(checkPosition, function() { return isClickFired });
> }
> 
> function checkPosition() {
>   element.removeEventListener("click", clickFired, true);

This one ^


Can we also remove isClickFired ?

r- but close, and make sure this doesn't break on desktop
Attachment #527684 - Flags: review?(mark.finkle) → review-
Attached patch Updated patchSplinter Review
Updated to notes. Also removed the isClickFired checks.
Assignee: nobody → wjohnston
Attachment #527684 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #527807 - Flags: review?(mark.finkle)
Attachment #527807 - Attachment is patch: true
Attachment #527807 - Attachment mime type: application/octet-stream → text/plain
Attachment #527807 - Flags: review?(mark.finkle) → review+
http://hg.mozilla.org/mozilla-central/rev/83b7d7837e6b
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Still failing every time.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Not sure whether this is significant, but the n900 failures come with a screenshot in the log, which shows that iframe-1, the one where we're firing a click at 1,1, is almost completely out of view, so we're firing a click at something offscreen.
Disabled on Android in http://hg.mozilla.org/mozilla-central/rev/d0583d604249
Whiteboard: [test disabled on Android]
Assignee: wjohnston → nobody
Status: REOPENED → RESOLVED
Closed: 13 years ago11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: