Closed Bug 1344616 Opened 3 years ago Closed 3 years ago

Support testing content scripts in xpcshell

Categories

(WebExtensions :: General, enhancement)

enhancement
Not set

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

Details

Attachments

(2 files)

No description provided.
Comment on attachment 8843831 [details]
Bug 1344616: Support running content script tests in xpcshell.

https://reviewboard.mozilla.org/r/117440/#review119306

::: testing/mochitest/BrowserTestUtils/ContentTask.jsm:17
(Diff revision 1)
>  
>  const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
>  Cu.import("resource://gre/modules/Promise.jsm");
>  Cu.import("resource://gre/modules/Services.jsm");
>  
> -const FRAME_SCRIPT = "chrome://mochikit/content/tests/BrowserTestUtils/content-task.js";
> +const FRAME_SCRIPT = "resource://testing-common/content-task.js";

Lets keep the BrowserTestUtils changes in the same patch together.
Attachment #8843831 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8843832 [details]
Bug 1344616: Migrate content script mochitests to xpcshell.

https://reviewboard.mozilla.org/r/117442/#review119360

::: testing/mochitest/BrowserTestUtils/moz.build:9
(Diff revision 2)
>  # License, v. 2.0. If a copy of the MPL was not distributed with this
>  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
>  
>  TESTING_JS_MODULES += [
>      'BrowserTestUtils.jsm',
> +    'content/content-task.js',

dito here, move to the other patch
Attachment #8843832 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8843832 [details]
Bug 1344616: Migrate content script mochitests to xpcshell.

https://reviewboard.mozilla.org/r/117442/#review119360

> dito here, move to the other patch

Good catch
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.