Closed Bug 1218679 Opened 4 years ago Closed 4 years ago

Integration tests for memory tool

Categories

(DevTools :: Memory, defect)

43 Branch
defect
Not set

Tracking

(firefox44 fixed)

RESOLVED FIXED
Firefox 44
Tracking Status
firefox44 --- fixed

People

(Reporter: jsantell, Assigned: jsantell)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We need to add browser mochitests for some common workflows, using simulated clicks, etc.

* Taking a snapshot, changing breakdown
* Turning on recording allocations, take a snapshot, invert
* Something with multiple snapshots
* In th event of an error, can take more snapshots (error can be simulated via action creator, possibly similar to bug 1218678

We need this before shipping to ensure robustness outside of our xpcshell tests.
Handles the breakdown changes, taking snapshots. Still needs something for inverting the tree, probably recording allocations from other bugs, error handling. This is just the core though, necessary.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=c9953fb83919
Assignee: nobody → jsantell
Status: NEW → ASSIGNED
Attachment #8679661 - Flags: review?(nfitzgerald)
Comment on attachment 8679661 [details] [diff] [review]
1218679-integration-memory.patch

Review of attachment 8679661 [details] [diff] [review]:
-----------------------------------------------------------------

v nice

::: devtools/client/memory/constants.js
@@ +29,5 @@
>  // Fired to toggle tree inversion on or off.
>  actions.TOGGLE_INVERTED = "toggle-inverted";
>  
> +// Fired to set a new breakdown.
> +actions.SET_BREAKDOWN = "set-breakdown";

lol

::: devtools/client/memory/initializer.js
@@ +37,5 @@
>    });
>  }
>  
>  function destroy () {
>    return Task.spawn(function*(){});

Should we set the globals to null here?

::: devtools/client/memory/test/browser/browser_memory-breakdowns-01.js
@@ +1,5 @@
> +/* Any copyright is dedicated to the Public Domain.
> +   http://creativecommons.org/publicdomain/zero/1.0/ */
> +
> +/**
> + * Tests that the heap tree renders rows based on the breakdown

nit: period

::: devtools/client/memory/test/browser/head.js
@@ +66,5 @@
>      finish();
>    });
>  }
> +
> +function waitUntilState (store, predicate) {

Can you make a test-utils.js module so we can share this between test suites?
Attachment #8679661 - Flags: review?(nfitzgerald) → review+
sorry had to back this out in https://treeherder.mozilla.org/#/jobs?repo=fx-team&revision=8edcaa544e24 since one of this changes caused test failures on windows and OS X like https://treeherder.mozilla.org/logviewer.html#?job_id=5401492&repo=fx-team
Flags: needinfo?(jsantell)
Flags: needinfo?(jsantell) → needinfo?(nfitzgerald)
https://hg.mozilla.org/mozilla-central/rev/ae06ef1f37db
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Flags: needinfo?(nfitzgerald)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.