Closed Bug 1444680 Opened 3 years ago Closed 3 years ago

Convert more webRequest tests to xpcshell

Categories

(WebExtensions :: Request Handling, enhancement)

enhancement
Not set
normal

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: kmag, Assigned: kmag)

Details

Attachments

(7 files)

We have too many mochitests. A lot of our webRequest tests could be converted into xpcshell tests. But a lot of our webRequest tests are also tangled messes, so I'm only going to go for the low-hanging fruit for now.
Comment on attachment 8957865 [details]
Bug 1444680: Part 1a: Move proxy filter host stubs to head.js.

https://reviewboard.mozilla.org/r/226828/#review232840
Attachment #8957865 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8957874 [details]
Bug 1444680: Part 1b: Add helper for calling fetch() in content context.

https://reviewboard.mozilla.org/r/226840/#review232846

::: toolkit/components/extensions/test/xpcshell/test_ext_webRequest_filterResponseData.js:26
(Diff revision 1)
>    response.setStatusLine(request.httpVersion, 200, "OK");
>    response.setHeader("Access-Control-Allow-Origin", "*");
>    response.write("ok");
>  });
>  
>  Cu.importGlobalProperties(["fetch"]);

is this necessary?
Attachment #8957874 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8957866 [details]
Bug 1444680: Part 2: Convert test_ext_webRequest_suspend to xpcshell.

https://reviewboard.mozilla.org/r/226830/#review232854
Attachment #8957866 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8957867 [details]
Bug 1444680: Part 3: Convert test_ext_webRequest_permission to xpcshell.

https://reviewboard.mozilla.org/r/226832/#review232868
Attachment #8957867 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8957868 [details]
Bug 1444680: Part 4: Convert test_ext_webRequest_webSocket to xpcshell.

https://reviewboard.mozilla.org/r/226834/#review232870
Attachment #8957868 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8957869 [details]
Bug 1444680: Part 5: Convert test_ext_webRequest_set_cookie to xpcshell.

https://reviewboard.mozilla.org/r/226836/#review232872
Attachment #8957869 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8957874 [details]
Bug 1444680: Part 1b: Add helper for calling fetch() in content context.

https://reviewboard.mozilla.org/r/226840/#review232846

> is this necessary?

Nope. It's from an older version of the patch.
Comment on attachment 8957870 [details]
Bug 1444680: Part 6: Convert test_ext_webRequest_responseBody to xpcshell.

https://reviewboard.mozilla.org/r/226838/#review232878
Attachment #8957870 - Flags: review?(mixedpuppy) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/599c42a12fcc8eee5e531e50cff162e815623329
Bug 1444680: Part 1a: Move proxy filter host stubs to head.js. r=mixedpuppy

https://hg.mozilla.org/integration/mozilla-inbound/rev/b3689730f6bd8f2af457021e1bd0820c720b9d85
Bug 1444680: Part 1b: Add helper for calling fetch() in content context. r=mixedpuppy

https://hg.mozilla.org/integration/mozilla-inbound/rev/590b8679be3da45c7923b7b49c2cbddf67222af2
Bug 1444680: Part 2: Convert test_ext_webRequest_suspend to xpcshell. r=mixedpuppy

https://hg.mozilla.org/integration/mozilla-inbound/rev/36eb1b1ba44f62f05cb225e6ef5902c41f98073b
Bug 1444680: Part 3: Convert test_ext_webRequest_permission to xpcshell. r=mixedpuppy

https://hg.mozilla.org/integration/mozilla-inbound/rev/9d5817d7cb8ef26f5dfb68c26d2e96aea597c6e2
Bug 1444680: Part 4: Convert test_ext_webRequest_webSocket to xpcshell. r=mixedpuppy

https://hg.mozilla.org/integration/mozilla-inbound/rev/4545ede6e508a03e88bbf400ebcca1a65b0ce6c4
Bug 1444680: Part 5: Convert test_ext_webRequest_set_cookie to xpcshell. r=mixedpuppy

https://hg.mozilla.org/integration/mozilla-inbound/rev/156cad0b9e1737d97b02b71710bdf649d1d9f855
Bug 1444680: Part 6: Convert test_ext_webRequest_responseBody to xpcshell. r=mixedpuppy
https://hg.mozilla.org/integration/mozilla-inbound/rev/fb71712aceeb4be0ce59078c1e65f717a57582c8
Bug 1444680: Follow-up: Fix mozAddonManager API tests for non-HTTP test host access. r=bustage CLOSED TREE
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3f724fca687943e6f91254a8a5873ba63657c7e
Bug 1444680: Follow-up: Turn off forcing remote content pages due to Android bustage. r=bustage CLOSED TREE
https://hg.mozilla.org/integration/mozilla-inbound/rev/dfdfc8e56c31538f820d436a42fcfb24d583b26a
Bug 1444680: Follow-up: Release StreamFilterParent::mChannel on main thread. r=mixedpuppy a=bustage DONTBUILD CLOSED TREE
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb64f3189afef94e2fbb687c8645018f8ddbcf16
Bug 1444680: Follow-up: Temporarily skip filterResponseData test on debug builds. r=bustage CLOSED TREE
Turns out that running a bunch of webrequest tests in parallel is a fantastic way to turn up races. So, success.
https://hg.mozilla.org/integration/mozilla-inbound/rev/09006f4350b625fdd91babb1c9940c260bb30dd3
Bug 1444680: Follow-up: Fix StreamFilter race that turns up when running tests in parallel. r=mixedpuppy
https://hg.mozilla.org/integration/mozilla-inbound/rev/a38d3c69ee958a21b131ae579469ca5b22535c9f
Bug 1444680: Follow-up: Disable cached response test on Android because Android. r=bustage DONTBUILD CLOSED TREE
https://hg.mozilla.org/integration/mozilla-inbound/rev/e8f7c5e3991168e425ed9fc8b1638ef32e19beba
Bug 1444680: Follow-up: Disable test_ext_webRequest_suspend on Android because it crashes and the stacks have no symbols, so I have no idea why. r=bustage
https://hg.mozilla.org/integration/mozilla-inbound/rev/905e2b3c7f40b5dcf68d16b2ddc72bbb14483e02
Bug 1444680: Follow-up: Re-enable test_ext_webRequest_suspend without trying to load remote content on Android. r=me
Is manual testing required on this bug? If yes, please provide some STR and the proper extension(if required) or set the “qe-verify -“ flag.

Thanks!
Flags: needinfo?(kmaglione+bmo)
Flags: needinfo?(kmaglione+bmo) → qe-verify-
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.