Commit 2b5fdc3b authored by kalman@chromium.org's avatar kalman@chromium.org

Make extension browser tests always run as though they're on dev channel.

Tests that explicitly want to test other channels (e.g. test feature X behaves
differently on stable) then they can still enable that explicitly.

Review URL: https://chromiumcodereview.appspot.com/10829312

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151422 0039d316-1c4b-4281-b951-d872f2087c98
parent 21a9e92a
...@@ -47,7 +47,8 @@ ExtensionBrowserTest::ExtensionBrowserTest() ...@@ -47,7 +47,8 @@ ExtensionBrowserTest::ExtensionBrowserTest()
extension_installs_observed_(0), extension_installs_observed_(0),
extension_load_errors_observed_(0), extension_load_errors_observed_(0),
target_page_action_count_(-1), target_page_action_count_(-1),
target_visible_page_action_count_(-1) { target_visible_page_action_count_(-1),
current_channel_(chrome::VersionInfo::CHANNEL_DEV) {
EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
AppShortcutManager::SetShortcutCreationDisabledForTesting(true); AppShortcutManager::SetShortcutCreationDisabledForTesting(true);
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "base/scoped_temp_dir.h" #include "base/scoped_temp_dir.h"
#include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_host.h"
#include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/features/feature.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_observer.h"
...@@ -241,6 +242,9 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest, ...@@ -241,6 +242,9 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest,
// When waiting for visible page action count to change, we wait until it // When waiting for visible page action count to change, we wait until it
// reaches this value. // reaches this value.
int target_visible_page_action_count_; int target_visible_page_action_count_;
// Make the current channel "dev" for the duration of the test.
extensions::Feature::ScopedCurrentChannel current_channel_;
}; };
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_
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