Closed Bug 598957 Opened 9 years ago Closed 9 years ago

[TEST] Viewport browser-chrome tests failures

Categories

(Firefox for Android Graveyard :: General, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mfinkle, Assigned: mbrubeck)

Details

(Whiteboard: [mobile_unittests])

Attachments

(1 file, 2 obsolete files)

Current failures since layers landed in Fennec. I kept the TEST-PASS to make it easier to find the points of failure:

TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 0
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_00.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=980 [got 800, expected 980] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=0.8163265306122449 [got 1, expected 0.8163265306122449] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom enabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 1
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_01.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=533.33 [got 800, expected 533.33] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=1.5 [got 1, expected 1.5] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom enabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 2
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_02.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=533.33 [got 800, expected 533.33] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=1.5 [got 1, expected 1.5] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom enabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 3
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_03.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=533.33 [got 800, expected 533.33] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=1.5 [got 1, expected 1.5] - Got false, expected true
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom disabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom in does nothing
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom out does nothing
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 4
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_04.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=200 [got 800, expected 200] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=4 [got 1, expected 4] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom enabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 5
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_05.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=2000 [got 800, expected 2000] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=1.125 [got 1, expected 1.125] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom enabled
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom out limited
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 6
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_06.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=266.67 [got 800, expected 266.67] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=3 [got 1, expected 3] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom enabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom in limited
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 7
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_07.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=2000 [got 800, expected 2000] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=1.125 [got 1, expected 1.125] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom enabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 8
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_08.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=10000 [got 800, expected 10000] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=4 [got 1, expected 4] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom enabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL Matches blank page 9
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Normal 'browser' width is 980 pixels - Got 800px, expected 980px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes window width is 800px
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Test assumes zoom.dpiScale is 1.5
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | URL is chrome://mochikit/content/browser/mobile/chrome/browser_viewport_09.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport width=533.33 [got 800, expected 533.33] - Got false, expected true
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=1.5 [got 1, expected 1.5] - Got false, expected true
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom disabled
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom in does nothing
TEST-PASS | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Zoom out does nothing
Summary: Viewport browser-chrome tests failures → [TEST] Viewport browser-chrome tests failures
this is still a problem today with a fresh build.
Whiteboard: [mobile_unittests] [mobile_dev_needed]
Assignee: nobody → mbrubeck
Whiteboard: [mobile_unittests] [mobile_dev_needed] → [mobile_unittests]
Attached patch WIP (obsolete) — Splinter Review
* Updates the test to use browser.contentDocumentWidth instead of browser.style.
* Hacky workaround for the hacky workaround in bug 596952.

There are still some failures, which appear to be timing issues.
Attached patch patch (obsolete) — Splinter Review
Additional changes:

* Change pageLoaded to use documentURI instead of currentURI.  currentURI is set too soon in new tabs, while documentURI is not set until the LocationChange event.

* Fix an exception in the documentURI getter.

Viewport tests all pass with these changes, but there is an intermittent timeout when starting the last test case in this file.  (waitFor times out when loading the blank page before the 9th test.)  Investigating that now.
Attachment #479507 - Attachment is obsolete: true
Attachment #479552 - Flags: review?(mark.finkle)
Attachment #479552 - Flags: review?(mark.finkle) → review+
Attached patch patch v2Splinter Review
Instead of using documentURI, this fixes the currentURI behavior for remote browsers to match that of local browsers.  (This also fixes some problems in another browser-chrome test I am writing.)
Attachment #479552 - Attachment is obsolete: true
Attachment #479623 - Flags: review?(mark.finkle)
Comment on attachment 479623 [details] [diff] [review]
patch v2

>           loadURI: function(aURI, aLoadFlags, aReferrer, aPostData, aHeaders) {
>-            try {
>-              this._currentURI = this._browser._ios.newURI(aURI, null, null);
>-            } catch(e) {}

When I initially added this, I hoped it would be a good thing, since currentURI would be initialized ASAP. Should we set it too null or about:blank? Or is leaving it the previous URI the "right thing" to do?

Sounds like it might be the right thing.
Attachment #479623 - Flags: review?(mark.finkle) → review+
(In reply to comment #5)
> When I initially added this, I hoped it would be a good thing, since currentURI
> would be initialized ASAP. Should we set it too null or about:blank? Or is
> leaving it the previous URI the "right thing" to do?
> 
> Sounds like it might be the right thing.

Yes, I think this change is right - and if we do want to modify the behavior, we should do it for both local and remote tabs.
Pushed: http://hg.mozilla.org/mobile-browser/rev/3b03b8566adf
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.