diff --git a/electron_paks.gni b/electron_paks.gni index f87b78714f6d4..983b52c7df6eb 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -178,6 +178,7 @@ template("electron_paks") { "${root_gen_dir}/third_party/blink/public/strings/blink_accessibility_strings_", "${root_gen_dir}/third_party/blink/public/strings/blink_strings_", "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_", + "${root_gen_dir}/extensions/strings/extensions_strings_", "${root_gen_dir}/services/strings/services_strings_", "${root_gen_dir}/ui/strings/app_locale_settings_", "${root_gen_dir}/ui/strings/ax_strings_", @@ -187,6 +188,7 @@ template("electron_paks") { "//chrome/app/resources:platform_locale_settings", "//components/strings:components_strings", "//device/bluetooth/strings", + "//extensions/strings", "//services/strings", "//third_party/blink/public/strings", "//third_party/blink/public/strings:accessibility_strings", diff --git a/spec-main/extensions-spec.ts b/spec-main/extensions-spec.ts index 5c382d53e03b3..b2dc6d7f96c21 100644 --- a/spec-main/extensions-spec.ts +++ b/spec-main/extensions-spec.ts @@ -110,6 +110,12 @@ describe('chrome extensions', () => { expect(bg).to.equal('red'); }); + it('does not crash when loading an extension with missing manifest', async () => { + const customSession = session.fromPartition(`persist:${uuid.v4()}`); + const promise = customSession.loadExtension(path.join(fixtures, 'extensions', 'missing-manifest')); + await expect(promise).to.eventually.be.rejectedWith(/Manifest file is missing or unreadable/); + }); + it('does not crash when failing to load an extension', async () => { const customSession = session.fromPartition(`persist:${uuid.v4()}`); const promise = customSession.loadExtension(path.join(fixtures, 'extensions', 'load-error')); diff --git a/spec-main/fixtures/extensions/missing-manifest/main.js b/spec-main/fixtures/extensions/missing-manifest/main.js new file mode 100644 index 0000000000000..d1e760d7b9d07 --- /dev/null +++ b/spec-main/fixtures/extensions/missing-manifest/main.js @@ -0,0 +1 @@ +console.log('oh no where is my manifest');