Closed Bug 1056146 Opened 11 years ago Closed 10 years ago

Fix zoom tests in browser/base/content/test/general/ (using FullZoomHelper) to work in e10s

Categories

(Firefox :: General, defect)

defect
Not set
normal
Points:
5

Tracking

()

RESOLVED FIXED
Firefox 40
Iteration:
40.3 - 11 May
Tracking Status
e10s + ---
firefox40 --- fixed

People

(Reporter: mstange, Assigned: enndeakin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This prevents browser_bug1015721.js from working in e10s mode and also other tests that use FullZoomHelper and are marked with "Bug 691614 - no e10s zoom support yet".
tracking-e10s: --- → +
Depends on: 1088691
Blocks: 1080801
Interestingly, browser_bug559991.js using FullZoomHelper.load (which relies on promiseTabLoadEvent) and it's not broken. I've used it in other e10s tests and it seems to be fine because of all the shimming we do these days. However, all the other tests in browser/base/content/test/general that will shortly be referencing this bug rather than bug 691614 are still broken when running them in e10s mode locally, so something else in FullZoomHelper is breaking them in e10s...
Summary: FullZoomHelper uses promiseTabLoadEvent() which isn't e10s friendly → Fix zoom tests in browser/base/content/test/general/ (using FullZoomHelper) to work in e10s
Points: --- → 5
Flags: qe-verify-
Flags: in-testsuite+
Flags: firefox-backlog+
All of these seem to just have floating-point rounding issues (got 1.1 but received 1.100000023841858). Is it sufficient to just round these to a couple of decimal places when comparing? The exception is browser_bug1015721.js which uses EventUtils.synthesizeWheel which doesn't work yet.
Flags: needinfo?(adw)
Rounding to a couple of decimal places seems OK, but am I understanding right that the rounding errors only happen in e10s? That seems weird, doesn't it?
Flags: needinfo?(adw)
It is odd. I will look in more detail next week and see if I can determine where the difference is.
OK, so in single-process mode, we always retrieve markupDocumentViewer.fullZoom to get the zoom. This means we get the single-precision float value stored there (1.1 becomes 1.100000023841858) In e10s though, we cache the zoom value in JS in remote-browser.xml::_fullZoom. JS stores numbers as doubles (1.1 becomes 1.10000000000000008881784197001E0). JS rounds these to 16 digits which becomes 1.1 So the values don't compare the same. So we should either: 1. change the tests to account for the rounding issues 2. change ZoomManager to always return rounded values in all cases. I would think 2 would be better since I'd expect the zoom value to always correspond to a value in the toolkit.zoomManager.zoomValues preference.
Flags: needinfo?(adw)
Interesting, that sounds fine to me.
Flags: needinfo?(adw)
Attached patch PatchSplinter Review
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #8598954 - Flags: review?(adw)
Iteration: --- → 40.3 - 11 May
Attachment #8598954 - Flags: review?(adw) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: