Closed Bug 939186 Opened 11 years ago Closed 10 years ago

assert.noReflow

Categories

(Firefox OS Graveyard :: Gaia::TestAgent, defect, P2)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
1.4 S2 (28feb)

People

(Reporter: etienne, Assigned: etienne)

References

()

Details

(Keywords: perf, Whiteboard: [c=automation p= s= u=])

Attachments

(1 file)

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 [1] and a python marionette test [2].
And as of today, the assertion is true, there are no reflows during the app-to-app transition.

[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/system/test/marionette/edges_gesture_test.js
[2] https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/system/test_edge_gestures.py
Keywords: perf
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
Whiteboard: [c=automation p= s= u=]
Got it working.

Currentlty waiting to see if travis likes it:
https://github.com/mozilla-b2g/gaia/pull/16303
Status: NEW → ASSIGNED
Priority: -- → P2
Attached file Pointer to gaia PR
Gareth, would you do me the honor of reviewing the marionette part?
And Rik for the dialer part.
Attachment #8376737 - Flags: review?(gaye)
Attachment #8376737 - Flags: review?(anthony)
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+
See Also: → 975499
Ping Gareth now that the tree nightmare is over ;p
Flags: needinfo?(gaye)
Comment on attachment 8376737 [details] [review]
Pointer to gaia PR

Adding James to see if we can get this moving this week :)
Attachment #8376737 - Flags: review?(jlal)
Thanks for doing this etienne! I think it could use a tiny bit of massaging, but it's very cool :)
Flags: needinfo?(gaye)
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?
Attachment #8376737 - Flags: review?(jlal)
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!
Blocks: 977614
(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.
https://github.com/mozilla-b2g/gaia/commit/157e05190dd6d048109535cc3d77f361fe38f563

\o/
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Blocks: butter-QA
Target Milestone: --- → 1.4 S2 (28feb)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: