Closed Bug 939186 Opened 8 years ago Closed 7 years ago
In some parts for gaia, mainly during transitions, it's important for us *not* to cause any reflow. And, especially in the system app, it's pretty easy to regress on this front. Ideally we'd want a way to assert that no reflow occurred between point A and B in time during marionette tests. Not sure what the api should be but it could be something like: ``` client.startTrackingReflows(); // Do stuff assert.isTrue(client.reflowCount == 0); client.stopTrackingReflows(); ``` A great playground for this would the fast app switching gestures which is already covered by a JS marionette test  and a python marionette test . And as of today, the assertion is true, there are no reflows during the app-to-app transition.  https://github.com/mozilla-b2g/gaia/blob/master/apps/system/test/marionette/edges_gesture_test.js  https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/system/test_edge_gestures.py
This call will have to be implemented by the test runner/client sinc Marionette (the server living in gecko) is responsible for driving user actions and getting current state information, and should not have any logic for performance or other kind of data gathering. So the api call for 'startTrackingReflows' should be defined by the test runner to set up the reflow listener. How do you retrieve the reflow log information from Gecko?
(In reply to Malini Das [:mdas] from comment #1) s/How do you retrieve the reflow log information from Gecko?/How do you get notified of reflows?
Per my conversation with Etienne he was going to write some marionette plugin for this for our marionettte-js tests in gaia. (basically a wrapper around some executeScript calls).
Moving component since we confirmed that this shouldn't need any marionette specific stuffs.
Component: Marionette → Gaia::TestAgent
Product: Testing → Firefox OS
Actively working on it, so assigning myself for now. Not sure I will succeed yet, will reset the assignee if I stall :)
Assignee: nobody → etienne
Got it working. Currentlty waiting to see if travis likes it: https://github.com/mozilla-b2g/gaia/pull/16303
Looking good, looking green: https://travis-ci.org/mozilla-b2g/gaia/builds/18894239
Gareth, would you do me the honor of reviewing the marionette part? And Rik for the dialer part.
Comment on attachment 8376737 [details] [review] Pointer to gaia PR This is awesome news \o/ When testing with |APP=dialer make test-integration|, I'm seeing the tests run twice. And if I change the reflow number, only the first iteration fails. cf output below. Dialer > Keypad 1) Entering a 3 digits number with the keypad ✓ Using the special extention key (1316ms) ✓ Deleting a digit (508ms) ✓ Clearing the number by long pressing the delete key (1537ms) Dialer > Navigation ✓ Call Log (138ms) ✓ Contacts (182ms) Dialer > Keypad ✓ Entering a 3 digits number with the keypad (386ms) ✓ Using the special extention key (1238ms) ✓ Deleting a digit (476ms) ✓ Clearing the number by long pressing the delete key (1511ms) Dialer > Navigation ✓ Call Log (143ms) ✓ Contacts (180ms)
Attachment #8376737 - Flags: review?(anthony) → review+
Ping Gareth now that the tree nightmare is over ;p
Comment on attachment 8376737 [details] [review] Pointer to gaia PR Adding James to see if we can get this moving this week :)
Thanks for doing this etienne! I think it could use a tiny bit of massaging, but it's very cool :)
Comment on attachment 8376737 [details] [review] Pointer to gaia PR Patch updated! All comments addressed but one, not sure how to make the reflow helper more easily accessible. Do we need to make it a marionette js plugin?
Comment on attachment 8376737 [details] [review] Pointer to gaia PR A few stylistic nits but mostly LGTM. Thanks etienne! This is really cool :)
Attachment #8376737 - Flags: review?(gaye) → review+
If we want to fix the path issue it might make sense to turn this into a marionette plugin or perhaps just add it to marionette-helper. Up to you!
(In reply to Gareth Aye [:gaye] from comment #15) > If we want to fix the path issue it might make sense to turn this into a > marionette plugin or perhaps just add it to marionette-helper. Up to you! Filed bug 977614 for this.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.