Commit a0debfb3 authored by David Bertoni's avatar David Bertoni Committed by Commit Bot

[Extensions] Only require the "persistent" key to test SW extensions.

Creating a SW-based extension for testing using the
"kFlagRunAsServiceWorkerBasedExtension" flag currently requires
the "persistent" manifest key be false. This CL relaxes that
requirement so that the key only need be present.

Bug: 1093066
Change-Id: I93a2bdc2c8609e0c66f709cae11b7aff93cdb1fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316686Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: David Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791559}
parent 47943ce3
......@@ -330,9 +330,10 @@ bool ExtensionBrowserTest::CreateServiceWorkerBasedExtension(
{
base::Value* background_persistent = background_dict->FindKeyOfType(
"persistent", base::Value::Type::BOOLEAN);
if (!background_persistent || background_persistent->GetBool()) {
if (!background_persistent) {
ADD_FAILURE() << path.value()
<< ": Only event pages can be loaded as SW extension.";
<< ": The \"persistent\" key must be specified to run as a "
"Service Worker-based extension.";
return false;
}
}
......
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