Closed Bug 1378171 Opened 7 years ago Closed 7 years ago

Test which JS modules and components are loaded during content process startup

Categories

(Firefox :: General, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 56
Iteration:
56.2 - Jul 10
Tracking Status
firefox56 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug)

Details

(Whiteboard: [photon-performance])

Attachments

(1 file, 1 obsolete file)

Similarly to the browser_startup.js test landed in bug 1358798, we should test what scripts get loaded when starting a content process.
Status: NEW → ASSIGNED
Iteration: --- → 56.2 - Jul 10
Flags: qe-verify-
Priority: -- → P1
Attached patch Patch v2Splinter Review
Fixed the eslint failure by enabling the frame-script environment inside the framescript, and disabled on !e10s where this doesn't make sense (as we can't create a new process so the test sees modules loaded by previous tests...).
Attachment #8883341 - Attachment is obsolete: true
Attachment #8883341 - Flags: review?(mconley)
Attachment #8883386 - Flags: review?(mconley)
Comment on attachment 8883386 [details] [diff] [review]
Patch v2

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

Thanks!

::: browser/base/content/test/performance/browser_startup_content.js
@@ +40,5 @@
> +  let tab = await BrowserTestUtils.openNewForegroundTab({gBrowser,
> +                                                         forceNewProcess: true});
> +
> +  let mm = gBrowser.selectedBrowser.messageManager;
> +  let promise = new Promise(resolve => {

Alternatively, waitForMessage from BrowserTestUtils could be modified to resolve with the message data. I wouldn't block on that though. http://searchfox.org/mozilla-central/rev/a3a739de04ee6134c11546568a33dbb6a6a29907/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm#908
Attachment #8883386 - Flags: review?(mconley) → review+
Pushed by florian@queze.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2d7a625e8c99
add a test preventing us from loading scripts unintentionally during content process startup, r=mconley.
https://hg.mozilla.org/mozilla-central/rev/2d7a625e8c99
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Depends on: 1519574
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: