Closed Bug 999357 Opened 7 years ago Closed 6 years ago

Test failure "Context menu has been opened." in testSessionStore\testUndoTab.js


(Mozilla QA Graveyard :: Mozmill Tests, defect, P1)

Version 1


(firefox35 fixed, firefox36 fixed, firefox37 fixed, firefox38 fixed, firefox-esr31 fixed)

Tracking Status
firefox35 --- fixed
firefox36 --- fixed
firefox37 --- fixed
firefox38 --- fixed
firefox-esr31 --- fixed


(Reporter: danisielm, Assigned: cosmin-malutan)




(Keywords: intermittent-failure, Whiteboard: [mozmill-test-failure][sprint])


(2 files, 1 obsolete file)

This failed today on Firefox 31.0a1 en-US on mm-win-7-32-4 (20140419030204)

In the console log we also see this:

06:41:59 *************************
06:41:59 A coding exception was thrown in a Promise resolution callback.
06:41:59 Full message: TypeError: this.options is undefined
06:41:59 See
06:41:59 Full stack: Capture.prototype.start@resource://gre/modules/BackgroundPageThumbs.jsm:286:19
06:41:59 BackgroundPageThumbs._processCaptureQueue@resource://gre/modules/BackgroundPageThumbs.jsm:219:5
06:41:59 BackgroundPageThumbs.capture@resource://gre/modules/BackgroundPageThumbs.jsm:70:5
06:41:59 BackgroundPageThumbs.captureIfMissing/<@resource://gre/modules/BackgroundPageThumbs.jsm:91:7
06:41:59 Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:863:11
06:41:59 this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:742:7
06:41:59 sleep@resource://mozmill/stdlib/utils.js:223:5
06:41:59 MozMillElement.prototype.mouseEvent@resource://mozmill/driver/mozelement.js:395:3
06:41:59 tabBrowser.prototype.selectedIndex@resource://mozmill/stdlib/securable-module.js -> file:///c:/jenkins/workspace/mozilla-central_functional/data/mozmill-tests/firefox/lib/tabs.js:485:5
06:41:59 testUndoTabViaShortcut@resource://mozmill/modules/frame.js -> file:///c:/jenkins/workspace/mozilla-central_functional/data/mozmill-tests/firefox/tests/functional/testSessionStore/testUndoTab.js:91:3
06:41:59 Runner.prototype.execFunction@resource://mozmill/modules/frame.js:752:5
06:41:59 Runner.prototype.runTestModule@resource://mozmill/modules/frame.js:706:9
06:41:59 Runner.prototype.runTestFile@resource://mozmill/modules/frame.js:690:3
06:41:59 runTestFile@resource://mozmill/modules/frame.js:775:3
06:41:59 Bridge.prototype._execFunction@resource://jsbridge/modules/Bridge.jsm:140:3
06:41:59 Bridge.prototype.execFunction@resource://jsbridge/modules/Bridge.jsm:147:1
06:41:59 @resource://jsbridge/modules/Server.jsm:32:1
06:41:59 Server.Session/<@resource://jsbridge/modules/Server.jsm:32:5
06:41:59 Sockets.Client.prototype.onMessage/event.notify@resource://jsbridge/modules/Sockets.jsm:40:11
06:41:59 *************************
Whiteboard: [mozmill-test-failure]
What are we doing here?

06:41:59 testUndoTabViaShortcut@resource://mozmill/modules/frame.js -> file:///c:/jenkins/workspace/mozilla-central_functional/data/mozmill-tests/firefox/tests/functional/testSessionStore/testUndoTab.js:91:3

I don't see why we issue a click() event for a shortcut test.
Failed again with Aurora en-US on Vista x86 (mm-win-vista-32-3):
Failed again today with Aurora zh-CN on Vista x86 (mm-win-vista-32-4).

This failed 7 times on Vista & once on Windows 7 in the last month.
Priority: -- → P3
Duplicate of this bug: 1021725
OS: Linux → All
Priority: P3 → P2
Failed 5 times this week, on OS X and Windows, with de and zh-cn locales. Daniel, please look into comment 2 when you have the time. Thanks!
Hmm, looked into this and I have some thoughts on this failure. I think that most likely it's something similar with bug 998253.

Steps we do in the test:

1. Open firefox (opens with 2 tabs opened).
2. Call 'closeAllTabs()' in setupModule 
3. Closes the *1st Tab* so the *2nd Tab* animates from right to left.
4. While the animation is happening we access 'about:blank' and wait for it to be loaded (but this could happen very fast).
5. Right click on the tab to open the contextMenu (here the tab may be still animating (right to left)) and it may fail to open the context menu.

This failure is intermitend and I couldn't reproduce it.
This is just an assumption, but I would suggest to improve our 'closeTab()' method for the case we are closing a tab that's not the last one (to wait for all possible events may occur).
(In reply to Henrik Skupin (:whimboo) [away 07/19 - 08/01] from comment #2)
> What are we doing here?
> 06:41:59 testUndoTabViaShortcut@resource://mozmill/modules/frame.js ->
> file:///c:/jenkins/workspace/mozilla-central_functional/data/mozmill-tests/
> firefox/tests/functional/testSessionStore/testUndoTab.js:91:3
> I don't see why we issue a click() event for a shortcut test.

We select the 1st tab by clicking on it there.
Maybe bug 1047312 will fix this issue.
Failed once again : 1 failure in the last 6 days, on Aurora en-Us ... Windows 8 x64
We had 6 failures today with this on Win & OSX, with the latest beta (33).
My best guess is that we issue a click on the first tab but given that that's still animateing, it may fail to select sometimes.
Failed 9 times today on Win 8.1 mainly, one Win 7 and one OSX 10.9, with beta, different locales:

I'll have a look later today.
Assignee: nobody → andreea.matei
10 other failures with the latest beta on different locales. Check the link from Comment 19 to see.

Once I have time I will get to bug 1047312 and investigate on the events we should wait when we close a tab. Maybe that will fix this.
15 failures this beta cycle again
Whiteboard: [mozmill-test-failure] → [mozmill-test-failure][sprint]
Attached patch skiptestundotab.patch (obsolete) — Splinter Review
Attachment #8512608 - Flags: review?(andrei.eftimie)
Attachment #8512608 - Flags: review?(andreea.matei)
Comment on attachment 8512608 [details] [diff] [review]

Review of attachment 8512608 [details] [diff] [review]:

::: firefox/tests/functional/testSessionStore/manifest.ini
@@ +1,4 @@
>  [parent:../manifest.ini]
>  [testUndoTab.js]
> +disabled = Bug 999357 - Test failure "Context menu has been opened." in testSessionStore\testUndoTab.js
\ No newline at end of file

Please remove the test name from here as we already know which one is from the line above. Lets keep just the failure message.
Attachment #8512608 - Flags: review?(andrei.eftimie)
Attachment #8512608 - Flags: review?(andreea.matei)
Attachment #8512608 - Flags: review-
Attachment #8512608 - Attachment is obsolete: true
Attachment #8512618 - Flags: review?(andrei.eftimie)
Attachment #8512618 - Flags: review?(andreea.matei)
Comment on attachment 8512618 [details] [diff] [review]

Review of attachment 8512618 [details] [diff] [review]:

remote: (default)
remote: (mozilla-aurora)
remote: (mozilla-beta)
remote: (mozilla-release)
Attachment #8512618 - Flags: review?(andrei.eftimie)
Attachment #8512618 - Flags: review?(andreea.matei)
Attachment #8512618 - Flags: review+
Attachment #8512618 - Flags: checkin+
Assignee: andreea.matei → daniela.domnici
I`ll tried to reproduce it using Ubuntu 13.10 Staging Machine and Windows 8.1 staging machine.It didn`t fail  at all.Here are the results:
Nightly: ;
Beta : ;
This was failing intermittently, but quite often in a few days. Please do multiple testruns (30-40), we want to be sure.
And also please keep in mind fixes in bug 1108077, if it helps.
What I've done to investigate this:
I added a try/catch on the failing line, with an sleep in catch to see what actually happens. 
The menu was opened, but on a closer look, it was the wrong one, we opened the "toolbar-context-menu" instead of "tabContextMenu". Under what circumstances can this happen? If we right click on toolbar instead of tab. At the line we open the context menu, we clearly give as the context the tab node and not the toolbar, so the only thing that could happen is that we don't wait for animation correctly, and the tab still animates at the time we dispatch the right-click event.

I dumped again the transition events when we open an tab and we don't have only one but three, and they distinguishes by diffrent propertyName("visibility", "min-width", "max-width"). I suggest in lib/tabs.js/_waitForTabOpened method we wait for all of them, this seems to fix the issue. Henrik do you agree?
Assignee: daniela.domnici → cosmin.malutan
Attachment #8544457 - Flags: feedback?(hskupin)
Comment on attachment 8544457 [details]
Screenshot from 2015-01-06 10:36:39.png

I don't see why I have to give feedback on a screenshot. Needinfo would be the appropriate flag. Anyway...

That's interesting because I have seen something similar on bug 1112601. I think we should use that other bug to bring the code for handling open/close tabs up-to-date. Cosmin, would you mind taking that one, given that you already investigated a lot here?
Attachment #8544457 - Flags: feedback?(hskupin)
Depends on: 1112601
With the latest patch from bug 1112601 landed the test doesn't fail anymore.

Andreea, could you backout the skip from default please?
Flags: needinfo?(andreea.matei)
Ran well on default, let's backport it to Aurora.
Flags: needinfo?(andreea.matei)
No failure since it was re-enabled, Andreea could you backout the skip from beta and release and close the bug?
Flags: needinfo?(andreea.matei) (beta) (release)
Closed: 6 years ago
Flags: needinfo?(andreea.matei)
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.