[B2G] dom-level0/test_innerWidthHeight_script.html times out

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jgriffin, Unassigned)

Tracking

Trunk
All
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
On B2G, the test dom-level0/test_innerWidthHeight_script.html times out with no other errors, when run on TBPL on an emulator.  It will be disabled.

Full log:

https://tbpl.mozilla.org/php/getParsedLog.php?id=16520553&tree=Cedar&full=1#error0
(Reporter)

Comment 1

5 years ago
Test excluded: https://hg.mozilla.org/mozilla-central/rev/de98ab14e746
Is this reproducible easily?  Are there any exceptions reported or anything like that?
(Reporter)

Comment 3

5 years ago
Yes, it is 100% reproducible, and no exceptions or any other errors appear.
(Reporter)

Comment 4

5 years ago
This is also the only one of the dom-level0/1/2 tests that fail on B2G.
(Reporter)

Comment 5

5 years ago
(In reply to Jonathan Griffin (:jgriffin) from comment #3)
> Yes, it is 100% reproducible, and no exceptions or any other errors appear.

I take that back.  There is one error, that occurs for every test:

07:41:28     INFO -  25 INFO Error: Unable to restore focus, expect failures and timeouts.

This is filed separately as bug 788866.
OK.  Does the window that this test tries to open actually open?
(Reporter)

Comment 7

5 years ago
(In reply to Boris Zbarsky (:bz) from comment #6)
> OK.  Does the window that this test tries to open actually open?

No it does not.  I'm not sure what the status of window.open is; maybe jlebar knows?
(In reply to Jonathan Griffin (:jgriffin) from comment #7)
> (In reply to Boris Zbarsky (:bz) from comment #6)
> > OK.  Does the window that this test tries to open actually open?
> 
> No it does not.  I'm not sure what the status of window.open is; maybe
> jlebar knows?

You're running these tests inside <iframe mozbrowser>, I take it?

You have to handle the mozbrowseropenwindow and mozbrowserclose events (fired on the main iframe and the popup iframe, respectively), otherwise window.open and window.close won't do anything.

You'd want to do something like

iframe.addEventListener('mozbrowseropenwindow', function(e) {
  var popupIframe = e.detail.frameElement;
  popupIframe.addEventListener('mozbrowserclose', function(e) {
    document.body.removeChild(popupIframe);
  });

  popupIframe.addEventListener('mozbrowseropenwindow', function(e) {
    // yes, the popup can call window.open too!
  });

  document.body.appendElement(popupIframe);
});

in addition, you'd probably want to make the test fail if any popups are still open when the test completes.
(Reporter)

Comment 9

5 years ago
Cool.  The patch for bug 798580 might automatically fix this.  If it doesn't, I'll file another bug to handle it.
Depends on: 798580

Updated

5 years ago
Depends on: 850302
(In reply to Jonathan Griffin (:jgriffin) from comment #9)
> Cool.  The patch for bug 798580 might automatically fix this.  If it
> doesn't, I'll file another bug to handle it.

This is still an issue, so I filed bug 850302 for it.
I'm removing this entry from the exclude list in bug 860748, because this is fixed with the fix from bug 850302, so closing this bug.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.