Unreviewed changes
3 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/test/data/extensions/api_test/permissions/optional_deny/background.js
Insertions: 1, Deletions: 0.
@@ -18,6 +18,7 @@
chrome.test.log("Requesting url: " + url);
fetch(url).then(function(response) {
+ assertEq(200, response.status);
return response.text();
}).then(function(text) {
assertEq("Hello!", text);
```
Change information
Commit message:
[Extensions] Update permissions API tests to MV3
MV2 has been unsupported for several months. We can remove testing
support for it. Existing tests should be updated to MV3.
Update API tests for the permissions API to use manifest version 3
instead of manifest version 2 and 3.
With the transition to MV3, many of these tests may also be able to be
updated to use new patterns, such as async / await, service worker
modules, and more. However, those changes are out of scope for these
CLs, and can be addressed in followups.
Additional Notes:
* PermissionsApiTestWithContextType is now no longer needed. Remove it.
* A few tests still use MV2 extensions because they rely on certain
functionality (typically, access to a DOM or sharing a thread with
other contexts). In this case, notes have been added above the
associated test.
* XHR calls (which are unavailable in SWs) in tests have been updated
to use fetch().
Bug: 491516661
Change-Id: If9daa1097f0c457acb95b8a8adbabb0b21cea7ca
Cr-Commit-Position: refs/heads/main@{#1598181}
Files:
- M chrome/browser/extensions/api/permissions/permissions_apitest.cc
- M chrome/test/data/extensions/api_test/permissions/always_allowed/manifest.json
- M chrome/test/data/extensions/api_test/permissions/disabled/manifest.json
- M chrome/test/data/extensions/api_test/permissions/enabled/manifest.json
- M chrome/test/data/extensions/api_test/permissions/experimental_disabled/manifest.json
- M chrome/test/data/extensions/api_test/permissions/file_access_no/manifest.json
- M chrome/test/data/extensions/api_test/permissions/file_access_yes/manifest.json
- M chrome/test/data/extensions/api_test/permissions/file_load/background.js
- M chrome/test/data/extensions/api_test/permissions/file_load/manifest.json
- M chrome/test/data/extensions/api_test/permissions/host_subsets/manifest.json
- M chrome/test/data/extensions/api_test/permissions/optional/manifest.json
- M chrome/test/data/extensions/api_test/permissions/optional_deny/background.js
- M chrome/test/data/extensions/api_test/permissions/optional_deny/manifest.json
- M chrome/test/data/extensions/api_test/permissions/optional_gesture/manifest.json
- M chrome/test/data/extensions/api_test/permissions/optional_policy_blocked/manifest.json
Change size: M
Delta: 15 files changed, 72 insertions(+), 103 deletions(-)
Branch: refs/heads/main
Submit Requirements:
Code-Review: +1 by Tim