Closed Bug 1665810 Opened 5 years ago Closed 5 years ago

Write xpcshell or mochitest to test DOMEventMarker (and others) in Firefox

Categories

(Core :: Gecko Profiler, task, P3)

task

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: mozbugz, Assigned: gregtatum)

References

Details

Attachments

(1 file)

Bug 1664732 transitioned the "DOMEvent" marker to the new C++ API (meta bug 1661394), but it removed the unit test for the marker payload.

I believe the unit test was fine to remove in that case, as we test lots of other marker types, so this one marker type would be unlikely to break in isolation.

However, as Greg said in https://phabricator.services.mozilla.com/D90185#inline-511826 :

I think it would be worthwhile to eventually create end-to-end tests for markers, through either xpcshell tests or mochitests.

  • Start up Firefox, load a page.
  • Fire a DOM event naturally
  • Capture the profile using the JS API, and assert properties on the collected marker.

I think this would be valuable for other marker types as well.

Assignee: nobody → gtatum

I created a new test file for testing markers in the parent process. It
can be re-used to test a variety of different markers and their payloads
to ensure they are properly being created, and with relevant information.
The idea here is that this tests the entire pipeline, and excercises the
code as an end user of the profiler would.

Depends on D92456

Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fdc241290ef2 Add an end-to-end mochitest for DOMEvent markers r=gerald
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: