Last Comment Bug 753646 - Test failure: "The tab with index '0' has been selected" in testPrivateBrowsing/testCloseWindow.js
: Test failure: "The tab with index '0' has been selected" in testPrivateBrowsi...
Status: RESOLVED FIXED
[qa-]
: regression
Product: Mozilla QA
Classification: Other
Component: Mozmill Tests (show other bugs)
: unspecified
: All Mac OS X
: -- normal (vote)
: ---
Assigned To: Henrik Skupin (:whimboo)
:
:
Mentors:
Depends on: 753763
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-09 22:45 PDT by Henrik Skupin (:whimboo)
Modified: 2012-08-14 08:14 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---
unaffected
fixed
fixed


Attachments
Patch v1 (3.83 KB, patch)
2012-05-10 07:08 PDT, Henrik Skupin (:whimboo)
dave.hunt: review+
Details | Diff | Splinter Review

Description Henrik Skupin (:whimboo) 2012-05-09 22:45:26 PDT
This test is only run on OS X and fails on 15.0a1 and 14.0a2 with "The tab with index '0' has been selected". I can even see 'can't access dead object' failures in the list.

http://mozmill-ci.blargon7.com/#/functional/failure?branch=All&platform=Mac&from=2012-05-03&to=2012-05-10&test=%2FtestPrivateBrowsing%2FtestCloseWindow.js&func=testCloseWindow.js%3A%3AtestCloseWindow

Beside that failure I will also add the skip test entry which really disables the test on other platforms, so we can fix:


http://mozmill-ci.blargon7.com/#/functional/failure?branch=All&platform=All&from=2012-05-03&to=2012-05-10&test=%2FtestPrivateBrowsing%2FtestCloseWindow.js&func=testCloseWindow.js%3A%3AsetupModule

This first reported issue could be a regression in Firefox we will have to investigate.
Comment 1 Henrik Skupin (:whimboo) 2012-05-09 23:04:52 PDT
The first time this failure happened was with 14.0a1 (20120326031149). I did a test with the builds 2012032503 and 2012032603, and can approve that this is a regression in Firefox.

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=20a01901480f&tochange=ba4983d9c1f9

I will do some manual tests to see what's going on here and if this is only tied to automation.
Comment 2 Henrik Skupin (:whimboo) 2012-05-09 23:13:52 PDT
This is a timing issue. Including an additional sleep before selecting a tab after restoring the closed window fixes the problem. Probably one of the changesets has been caused a slowness  in reopening the window. Looks like I will have to do a bisect.
Comment 3 Henrik Skupin (:whimboo) 2012-05-10 07:02:42 PDT
(In reply to Henrik Skupin (:whimboo) from comment #1)
> The first time this failure happened was with 14.0a1 (20120326031149). I did
> a test with the builds 2012032503 and 2012032603, and can approve that this
> is a regression in Firefox.
> 
> Pushlog:
> http://hg.mozilla.org/mozilla-central/
> pushloghtml?fromchange=20a01901480f&tochange=ba4983d9c1f9

I'm not able to build Firefox for changesets in between this range. So can't really figure out what could have been caused this regression.

But as I have found out this issue has something to do with Session Store. When we close the last window while staying in PB mode and leaving PB mode right after, the window gets reopened. The test doesn't fail if I add a little sleep right before we start to work with any of the elements. Also doing those steps manually doesn't show an issue. It's only visible with the current version of the Mozmill test and I can clearly confirm the regression range.

We have to get bug 753763 implemented for Mozmill 2.0. For 1.5 I would propose that we make use of a sleep call which is enough. If we will have a 1.5.13 release I will make sure to get the feature also landed there.
Comment 4 Henrik Skupin (:whimboo) 2012-05-10 07:08:52 PDT
Created attachment 622713 [details] [diff] [review]
Patch v1

This fixes:
* The wrong tab being selected after the closed window has been restored
* Correctly skip the test
* Minor adjustments
Comment 5 Dave Hunt (:davehunt) 2012-05-10 10:04:20 PDT
Comment on attachment 622713 [details] [diff] [review]
Patch v1

Looks good, and passes! r+
Comment 6 Henrik Skupin (:whimboo) 2012-05-10 13:38:47 PDT
Landed on default as:
http://hg.mozilla.org/qa/mozmill-tests/rev/dff8ba7429a3

I will wait for tomorrows results before the landing on older branches.
Comment 7 Henrik Skupin (:whimboo) 2012-05-11 01:57:57 PDT
Latest testrun on OS X for Nightly didn't show this failure:
http://mozmill-ci.blargon7.com/#/functional/report/c2b72632f20450b6d99d14c709c2dcd6

Because the skip code changes will also affect other branches I have this landed across branches:

http://hg.mozilla.org/qa/mozmill-tests/rev/627f9ed384e5 (aurora)
http://hg.mozilla.org/qa/mozmill-tests/rev/cbad36563bc0 (beta)
http://hg.mozilla.org/qa/mozmill-tests/rev/f9c002f2d6cc (release)
http://hg.mozilla.org/qa/mozmill-tests/rev/959c0d983643 (esr)

Note You need to log in before you can comment on or make changes to this bug.