Commit 89dbc678 authored by proberge's avatar proberge Committed by Commit Bot

Extension content verification: move browser test disable logic

This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/692554
which disabled extension content verification from tests inheriting from
ExtensionBrowserTest. For pref hash browsertests, there seems to be a time window 
between the PRE_ tests and their normal counterpart during which which extension
content verification is enabled. During this time window, the good.crx extension
installed by PrefHashBrowserTestUnchangedCustom is disabled.

This should fix the failures described in
https://bugs.chromium.org/p/chromium/issues/detail?id=770001#c8 and allow
us to re-land https://chromium-review.googlesource.com/c/chromium/src/+/698985

Bug: 766806
Change-Id: I261eaef5eae9cf192a6f514092c3b5ad4feafc8e
Reviewed-on: https://chromium-review.googlesource.com/703508Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: proberge <proberge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506940}
parent f0f90f77
...@@ -177,6 +177,11 @@ void ExtensionBrowserTest::SetUpCommandLine(base::CommandLine* command_line) { ...@@ -177,6 +177,11 @@ void ExtensionBrowserTest::SetUpCommandLine(base::CommandLine* command_line) {
ExtensionMessageBubbleFactory::set_override_for_tests( ExtensionMessageBubbleFactory::set_override_for_tests(
ExtensionMessageBubbleFactory::OVERRIDE_DISABLED); ExtensionMessageBubbleFactory::OVERRIDE_DISABLED);
if (!ShouldEnableContentVerification()) {
ignore_content_verification_.reset(
new extensions::ScopedIgnoreContentVerifierForTest());
}
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
if (set_chromeos_user_) { if (set_chromeos_user_) {
// This makes sure that we create the Default profile first, with no // This makes sure that we create the Default profile first, with no
...@@ -197,11 +202,6 @@ void ExtensionBrowserTest::SetUpOnMainThread() { ...@@ -197,11 +202,6 @@ void ExtensionBrowserTest::SetUpOnMainThread() {
test_extension_cache_.get()); test_extension_cache_.get());
} }
if (!ShouldEnableContentVerification()) {
ignore_content_verification_.reset(
new extensions::ScopedIgnoreContentVerifierForTest());
}
// We don't use test_data_dir_ here because we want this to point to // We don't use test_data_dir_ here because we want this to point to
// chrome/test/data/extensions, and subclasses have a nasty habit of altering // chrome/test/data/extensions, and subclasses have a nasty habit of altering
// the data dir in SetUpCommandLine(). // the data dir in SetUpCommandLine().
......
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