Open Bug 1011171 Opened 10 years ago Updated 2 years ago

browser_minimize.js test failure on ubuntu 12 in vmware

Categories

(Firefox :: General, defect)

x86
Linux
defect

Tracking

()

People

(Reporter: mixedpuppy, Unassigned)

References

Details

Attachments

(1 file)

A linux-only test failure on an unrelated bug caused me to rerun tests on linux (in my vmware vm).  I ran into 100% failure in browser_minimize.js because docShell.isActive is *always* true and didn't work to detect the window being minimized.  A secondary issue, window.restore() does not work, however window.focus() does work (this is testable via browser console).

To make the test pass, I had to test/check using windowState (which apparently isn't good based on comments in the test file, but was the only working solution for me) and call window.focus instead, and drop any test/check against isActive.

I think I can at least bypass this issue for now and move on, but it seems we're not consistent across linux in regards to windowState/isActive/document.hidden, etc. when minimizing and restoring.
btw, to be more specific:

shanec@ubuntu:~/moz/fx-team$ uname -a
Linux ubuntu 3.2.0-61-generic-pae #93-Ubuntu SMP Fri May 2 21:46:08 UTC 2014 i686 i686 i386 GNU/Linux

running under vmware Version 6.0.3 (1747349) under osx 10.9.2, on a mac air with 11" screen.  I mention screen size because other bc tests fail for me if I do not run the session full screen.
For a start, does the window actually minimize for you when the test calls minimize()?
Flags: needinfo?(mixedpuppy)
(In reply to Boris Zbarsky [:bz] from comment #2)
> For a start, does the window actually minimize for you when the test calls
> minimize()?

yes, it does minimize.  I'm able to reproduce this in firefox 29 included by the distro by using the browser console to minimze the window.  window.restore wont work, but window.focus restores the window.  neither document.hidden or docShell.isActive reflect the correct state of the window when it is minimized.
Flags: needinfo?(mixedpuppy)
document.hidden an docshell.isActive are the same boolean, so that's not surprising.

Are we getting a "sizemodechange" event in the handleEvent in tabbrowser.xml?
(In reply to Boris Zbarsky [:bz] from comment #4)
> document.hidden an docshell.isActive are the same boolean, so that's not
> surprising.
> 
> Are we getting a "sizemodechange" event in the handleEvent in tabbrowser.xml?

I tried watching for that event in the test, as well as the page visibility events, nothing happens.
If by "in the test" you mean in browser_minimize.js, it's not clear to me that it would get that event.  You were watching on the main chrome window, right?

In any case, figuring out why sizemodechange is not firing is what needs to happen here.  If that doesn't fire, then we don't know we've changed sizemode.
This is the test file that is failing in this case.  I was trying to figure out if there were a consistent way to detect the minimized state on my linux vm.  On osx I do get the sizemodechange events, on linux I do not.  I also see that document.hidden is does not correspond to isActive, at least on OSX, possibly due to this being a chrome window? Here's the test output from osx (slightly edited for readability):

TEST-START | chrome://mochitests/content/browser/browser/base/content/test/general/browser_minimize.js
 TEST-INFO | window location chrome://browser/content/browser.xul
 TEST-PASS | Docshell should be active
 TEST-INFO | *** sizemodechange target is chrome://browser/content/browser.xul
 TEST-INFO |     document hidden?false
 TEST-INFO |     isActive? false
 TEST-INFO |     minimized? true
 TEST-PASS | window state should be minimized
 TEST-INFO | *** sizemodechange target is chrome://browser/content/browser.xul
 TEST-INFO |     document hidden?false
 TEST-INFO |     isActive? true
 TEST-INFO |     minimized? false
 TEST-PASS | window state should be normal
> on linux I do not

Well, that would be the bug then.  The active state is triggered off the sizemode event.

> document.hidden is does not correspond to isActive

document.hidden corresponds to isActive on that document's docshell.  But you're comparing document.hidden on the chrome document to isActive on the content docshell inside the tabbrowser.
(In reply to Boris Zbarsky [:bz] from comment #8)
> document.hidden corresponds to isActive on that document's docshell.  But
> you're comparing document.hidden on the chrome document to isActive on the
> content docshell inside the tabbrowser.

/me facepalm
I am running into this problem while running inside a docker image on taskcluster.  In addition on my local ubuntu linux64 machine locally, I see this test fail as well.

what changes do I need at the OS level to support this?  this brings up another question of do we not deactivate the docshell on most linux distributions?

you can see logs here:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=899f61b37a6b&group_state=expanded&selectedJob=14965123&filter-searchStr=bc7
I'm not seeing this issue happen anymore in our ongoing TaskCluster/docker work.
I'm removing the dependency for now.
No longer blocks: tc-linux64-debug
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: