Closed
Bug 1173580
Opened 9 years ago
Closed 9 years ago
Write full-stack mochitest for APZ layerization
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: botond, Assigned: botond)
References
Details
Attachments
(4 files, 3 obsolete files)
40 bytes,
text/x-review-board-request
|
kats
:
review+
|
Details |
3.93 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
3.24 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
9.31 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
Bug 1161206 added our first full-stack APZ mochitest, and bug 1172648 our second. I will write some more, exercising various pieces of basic APZ functionality (that we can't test for with gtests).
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → botond
Assignee | ||
Comment 1•9 years ago
|
||
Let's have one bug per test.
Summary: Write full-stack mochitests exercising basic APZ functionality → Write full-stack mochitest for APZ layerization
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1173580 - Record content descriptions in APZ test data. r=kats
Attachment #8621370 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 3•9 years ago
|
||
Bug 1173580 - Make synthesizeNativeWheelAnd*() functions iframe-friendly. r=kats
Attachment #8621371 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 4•9 years ago
|
||
Bug 1173580 - Add utilities for synthesizing mouse move events to apz_test_native_event_utils.js. r=kats
Attachment #8621372 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 5•9 years ago
|
||
Bug 1173580 - Full-stack APZ layerization mochitest. r=kats
Attachment #8621373 -
Flags: review?(bugmail.mozilla)
Comment 6•9 years ago
|
||
Comment on attachment 8621370 [details] MozReview Request: Bug 1173580 - Record content descriptions in APZ test data. r=kats https://reviewboard.mozilla.org/r/10965/#review9605
Attachment #8621370 -
Flags: review?(bugmail.mozilla) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8621371 [details] MozReview Request: Bug 1173580 - Make synthesizeNativeWheelAnd*() functions iframe-friendly. r=kats https://reviewboard.mozilla.org/r/10967/#review9603 ::: gfx/layers/apz/test/apz_test_native_event_utils.js:70 (Diff revision 1) > - window.removeEventListener("wheel", wheelWaiter); > +function synthesizeNativeWheelAndWaitForWheelEvent(aElement, aX, aY, aDeltaX, aDeltaY, aCallback, aEventTarget=window) { Instead of having to pass this in explicitly, can we just get the window from the element? var eventTarget = aElement.ownerDocument.defaultView;
Attachment #8621371 -
Flags: review?(bugmail.mozilla)
Updated•9 years ago
|
Attachment #8621372 -
Flags: review?(bugmail.mozilla) → review+
Comment 8•9 years ago
|
||
Comment on attachment 8621372 [details] MozReview Request: Bug 1173580 - Add utilities for synthesizing mouse move events to apz_test_native_event_utils.js. r=kats https://reviewboard.mozilla.org/r/10969/#review9607 ::: gfx/layers/apz/test/apz_test_native_event_utils.js:115 (Diff revision 1) > +function synthesizeNativeMouseMoveAndWaitForEvent(aElement, aX, aY, aCallback, aEventTarget=window) { Rename this to ...WaitForMoveEvent for consistency.
Comment 9•9 years ago
|
||
Comment on attachment 8621373 [details] MozReview Request: Bug 1173580 - Full-stack APZ layerization mochitest. r=kats https://reviewboard.mozilla.org/r/10971/#review9609 ::: gfx/layers/apz/test/helper_iframe1.html:3 (Diff revision 1) > + identiable to show up in the root scroll frame's content description, s/identiable/identifiable/. Ditto for the other iframe ::: gfx/layers/apz/test/test_layerization.html:108 (Diff revision 1) > + ok(!isLayerized('outer4'), "initially 'outer3' should not be layerized"); copypasta error on outer4/inner4 lines ::: gfx/layers/apz/test/test_layerization.html:125 (Diff revision 1) > + var outer3 = document.getElementById('outer3'); If you change the eventTarget thing like I suggested in part 2, then you'd want to set outer3 to |document.getElementById('outer3').contentDocument.documentElement| here (similar to what you're doing in the outer4 case). It might also be more convenient if we change synthesizeNativeWheel to take the mozInnerScreenX/Y from the aElement's window, and then we only need to worry about passing in the getBoundingClientRect from the element relative to it's immediate containing window.
Attachment #8621373 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #7) > Comment on attachment 8621371 [details] > MozReview Request: Bug 1173580 - Make synthesizeNativeWheelAnd*() functions > iframe-friendly. r=kats > > https://reviewboard.mozilla.org/r/10967/#review9603 > > ::: gfx/layers/apz/test/apz_test_native_event_utils.js:70 > (Diff revision 1) > > - window.removeEventListener("wheel", wheelWaiter); > > +function synthesizeNativeWheelAndWaitForWheelEvent(aElement, aX, aY, aDeltaX, aDeltaY, aCallback, aEventTarget=window) { > > Instead of having to pass this in explicitly, can we just get the window > from the element? > var eventTarget = aElement.ownerDocument.defaultView; We can if we require that whenever the event is targeted at a subdocument, aElement is inside the subdocument. That seems reasonable, I'll change it.
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #9) > ::: gfx/layers/apz/test/test_layerization.html:125 > (Diff revision 1) > > + var outer3 = document.getElementById('outer3'); > > If you change the eventTarget thing like I suggested in part 2, then you'd > want to set outer3 to > |document.getElementById('outer3').contentDocument.documentElement| here > (similar to what you're doing in the outer4 case). > > It might also be more convenient if we change synthesizeNativeWheel to take > the mozInnerScreenX/Y from the aElement's window, and then we only need to > worry about passing in the getBoundingClientRect from the element relative > to it's immediate containing window. Thanks, this makes the test much cleaner! Note that I folded parts of this change into the Part 2 and Part 3 patches as appropriate. I fixed all the other comments as well, will post updated patches.
Assignee | ||
Comment 12•9 years ago
|
||
Posting patches manually because MozReview is currently unusable due to bug 1174353.
Attachment #8621371 -
Attachment is obsolete: true
Attachment #8622704 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 13•9 years ago
|
||
Carrying r+.
Attachment #8621372 -
Attachment is obsolete: true
Attachment #8622705 -
Flags: review+
Assignee | ||
Comment 14•9 years ago
|
||
Carrying r+.
Attachment #8621373 -
Attachment is obsolete: true
Attachment #8622707 -
Flags: review+
Comment 15•9 years ago
|
||
Comment on attachment 8622704 [details] [diff] [review] Part 2 - Make synthesizeNativeWheelAnd*() functions iframe-friendly Review of attachment 8622704 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/apz/test/apz_test_native_event_utils.js @@ +42,2 @@ > aX += window.mozInnerScreenX; > aY += window.mozInnerScreenY; Technically this is fine, but it's a little scary to me to have a local variable called |window| which shadows the global variable, as it could result in confusion. I'd rather call this "targetWindow" or even just "win" @@ +71,4 @@ > function synthesizeNativeWheelAndWaitForWheelEvent(aElement, aX, aY, aDeltaX, aDeltaY, aCallback) { > + var eventTarget = aElement.ownerDocument.defaultView; > + eventTarget.addEventListener("wheel", function wheelWaiter(e) { > + eventTarget.removeEventListener("wheel", wheelWaiter); "targetWindow" might be a good name here too.
Attachment #8622704 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 16•9 years ago
|
||
Renamed things to "targetWindow" locally. New Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a80918d6c0c5
Comment 17•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e7df200578ce https://hg.mozilla.org/integration/mozilla-inbound/rev/2fddc8dcca78 https://hg.mozilla.org/integration/mozilla-inbound/rev/1f163b3a20a8 https://hg.mozilla.org/integration/mozilla-inbound/rev/d5011b666d31
Comment 18•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e7df200578ce https://hg.mozilla.org/mozilla-central/rev/2fddc8dcca78 https://hg.mozilla.org/mozilla-central/rev/1f163b3a20a8 https://hg.mozilla.org/mozilla-central/rev/d5011b666d31
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•