Commit 50d5315d authored by Tim Judkins's avatar Tim Judkins Committed by Commit Bot

[Extensions] Fix flake in NativeBindingsApiTest.PromiseBasedAPI

There seems to be a potential flake at the moment when loading service
workers on unpacked extensions in tests, related to
https://crbug.com/1146173

Adding a flag to allow file access stops the extension being reloaded
and avoids this issue for now.

Bug: 1146301
Change-Id: Ia952ec24fa501ed379a67f8c6cb2313eca5851cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2527362Reviewed-by: default avatarDavid Bertoni <dbertoni@chromium.org>
Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Tim Judkins <tjudkins@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826417}
parent f902085a
......@@ -356,8 +356,13 @@ IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, PromiseBasedAPI) {
});)";
test_dir.WriteFile(FILE_PATH_LITERAL("background.js"), kBackgroundJs);
ResultCatcher catcher;
ASSERT_TRUE(LoadExtensionWithFlags(test_dir.UnpackedPath(),
kFlagIgnoreManifestWarnings));
// TODO(https://crbug.com/1146173): We shouldn't have to use the
// kEnableFileAccess flag here, but without it the extension gets reloaded to
// remove the file access that unpacked extensions are given by default. This
// reload can lead to a flaky failure related to registering service workers.
ASSERT_TRUE(LoadExtensionWithFlags(
test_dir.UnpackedPath(),
kFlagIgnoreManifestWarnings | kFlagEnableFileAccess));
ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment