Closed Bug 847881 Opened 9 years ago Closed 9 years ago

test_sizetocontent_clamp.html fails on win8

Categories

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

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: jimm, Assigned: jimm)

References

Details

Attachments

(1 file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=20302524&tree=Cedar&full=1#error0

ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/bugs/test_sizetocontent_clamp.html | innerWidth should be around 100

both debug and opt builds.
The smallest inner window width win8 allows is 122 pixels due to window chrome.
Attached patch fix for win8Splinter Review
Assignee: nobody → jmathies
Attachment #721206 - Flags: review?(mounir)
Comment on attachment 721206 [details] [diff] [review]
fix for win8

Review of attachment 721206 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the requested change

::: dom/tests/mochitest/bugs/test_sizetocontent_clamp.html
@@ +33,5 @@
>  // requested.
>  var epsilon =  navigator.platform.indexOf("Win") == -1 ? 5 : 20;
>  
> +// Update: Windows 8 has a minimum 122 pixel inner window width due to outer window chrome.
> +var isWin8 = (navigator.userAgent.indexOf("Windows NT 6.2") != -1);

nit: no need for the parenthesis

@@ +49,5 @@
>        }
>  
> +      if (isWin8) {
> +        ok(w.innerWidth >= 120 && w.innerWidth <= 125,
> +           "innerWidth should be around 122");

I would prefer you had something like:

var expectedWidth = isWin8 ? 125 : 120;
var expectedHeight = 100;

ok(w.innerWidth + epsilon >= expectedWidth && [...]);
ok([...]);
Attachment #721206 - Flags: review?(mounir) → review+
https://hg.mozilla.org/mozilla-central/rev/41efbfe49d66
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.