Closed
Bug 1234520
Opened 9 years ago
Closed 4 years ago
window.open popup dimensions are smaller than specified if the parent window is maximized on Windows 7
Categories
(Core :: Widget: Win32, defect, P4)
Tracking
()
RESOLVED
FIXED
90 Branch
People
(Reporter: dao, Assigned: emk)
Details
(Whiteboard: tests disabled: test_bug344861.html, test_bug369370.html, test_bug741266.html [tpi:+])
Attachments
(2 files)
I'm getting constant off-by-one and off-by-two errors with these tests in bug 384336. The cause seems to be that bug 384336 maximizes the browser window the tests run in, which in theory shouldn't bother these tests at all. I suspect there's a win32 widget bug somewhere, however I can't actually reproduce the problem by just using window.open in a maximized window on Win10. Maybe this is Win7-specific.
For now I'm going to disable these tests on Windows. CC'ing bz and dolske as the original authors.
TEST-UNEXPECTED-FAIL | docshell/test/navigation/test_bug344861.html | window.open has correct height dimensions - got 199, expected 200
TEST-UNEXPECTED-FAIL | docshell/test/navigation/test_bug344861.html | window.open has correct width dimensions - got 198, expected 200
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | Checking doc width - got 398, expected 400
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | Checking doc height - got 299, expected 300
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | image width - got 398, expected 400
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | image height - got 298, expected 300
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | image width - got 398, expected 400
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | image height - got 298, expected 300
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | Checking scrollLeft - got 402, expected 400
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | Checking scrollTop - got 301, expected 300
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | image width - got 398, expected 400
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug369370.html | image height - got 298, expected 300
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug741266.html | Popup height should be 100 when opened with window.open - got 99, expected 100
TEST-UNEXPECTED-FAIL | dom/html/test/test_bug741266.html | Popup height should be 100 when opened with document.open - got 99, expected 100
Reporter | ||
Comment 1•9 years ago
|
||
test_bug344861.html screenshot from https://treeherder.mozilla.org/#/jobs?repo=try&revision=1d8fb66fdbcb&selectedJob=14618598
In that try push I maximized the window regardless of the screen size to see if the failure surfaced on Windows only because we might be using larger screens for other platforms. Other platforms stayed green regardless.
Reporter | ||
Comment 2•9 years ago
|
||
Comment on attachment 8701015 [details]
mozilla-test-fail-screenshot_xsteoc.png
Note that the popup's content area is 198x199 here just like measured by the test, so this failure seems real (rather than a mistake in the test, which seems unlikely anyway since we have three tests failing and they're all pretty basic).
Reporter | ||
Updated•9 years ago
|
Keywords: leave-open
Comment 4•9 years ago
|
||
bugherder |
Reporter | ||
Updated•9 years ago
|
Keywords: leave-open
Whiteboard: tests disabled
Comment 6•9 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #5)
> Dolske, any idea what's up here?
Hmm, I don't really know. But I'd concur that this sounds like a widget bug. Is it possible these are the only tests opening a popup window and testing the expected size? (ie, I'd suspect the actual guts of the tests don't really matter). Maybe easy enough to verify by writing a trivial test that opens a popup window and checks the size.
If I slide out a little further on this wild-guess branch, I'd wonder if it's something to do with the size of native window decorations on children of maximized windows. I think widget/windows/nsWindow.cpp does some funky stuff around this, and could see there being an off-by-one kind of bug there. Further, the top window border is "special" so that would explain why the width is off by 2 (1px left + 1px right), while the height is only off by 1px (1px bottom but not top, of vice versa).
Probably needs someone to step through how the requested chrome window size and native window size interact? And see if this can be reproduced locally on a Win7 VM?
Flags: needinfo?(dolske)
Reporter | ||
Comment 7•9 years ago
|
||
I just checked this on a Windows 7 machine and could indeed reproduce it.
Flags: needinfo?(jmathies)
Summary: test_bug344861.html, test_bug369370.html, test_bug741266.html fail on Windows when the main window is maximized → window.open popup dimensions are smaller than specified if the parent window is maximized on Windows 7
Whiteboard: tests disabled → tests disabled: test_bug344861.html, test_bug369370.html, test_bug741266.html
Comment 8•9 years ago
|
||
FWIW, this seems eerily related to the test failures that appeared when trying to land bug 1005098...
Comment 9•9 years ago
|
||
I will try to get to this at some point, but right now I do not have the time.
Flags: needinfo?(jmathies)
Comment 10•9 years ago
|
||
This is causing some tests to be disabled in e10s mode in dom/html: https://dxr.mozilla.org/mozilla-central/source/dom/html/test/mochitest.ini
Comment 11•9 years ago
|
||
(Bug 384336 may have exposed this in testing more, but it sounds like a pre-existing issue, so removing to help tracking.)
No longer blocks: 384336
Reporter | ||
Comment 12•9 years ago
|
||
(In reply to Andrew Overholt [:overholt] from comment #10)
> This is causing some tests to be disabled in e10s mode in dom/html:
> https://dxr.mozilla.org/mozilla-central/source/dom/html/test/mochitest.ini
No, this is independent from e10s.
Updated•8 years ago
|
Priority: -- → P4
Whiteboard: tests disabled: test_bug344861.html, test_bug369370.html, test_bug741266.html → tests disabled: test_bug344861.html, test_bug369370.html, test_bug741266.html [tpi:+]
Assignee | ||
Comment 13•4 years ago
|
||
Is this still an issue? I can no longer reproduce the issue both on try and on local Win7 VM.
Assignee | ||
Comment 14•4 years ago
|
||
Updated•4 years ago
|
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Comment 15•4 years ago
|
||
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/b69e628e7733
Re-enable test_bug344861.html, test_bug369370.html, test_bug741266.html on Windows. r=dao
Comment 16•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox90:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Updated•4 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•