Closed Bug 807137 Opened 12 years ago Closed 11 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jgriffin, Unassigned)

References

Details

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
Is this reproducible easily?  Are there any exceptions reported or anything like that?
Yes, it is 100% reproducible, and no exceptions or any other errors appear.
This is also the only one of the dom-level0/1/2 tests that fail on B2G.
(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?
(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.
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
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
Closed: 11 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.