summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 18:46:37 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 18:46:37 +0000
commit7d9b8a0f83529e836b462d58767e8fb76854d779 (patch)
treee05527cb959415434ea8fe98718bcb293979f280
parent3a5241e609f323b8e3c7c634ab2bd3339ae570c9 (diff)
downloadchromium_src-7d9b8a0f83529e836b462d58767e8fb76854d779.zip
chromium_src-7d9b8a0f83529e836b462d58767e8fb76854d779.tar.gz
chromium_src-7d9b8a0f83529e836b462d58767e8fb76854d779.tar.bz2
Merge 146156 - Set the Feature's ChannelForTesting to Trunk during extension tests, so that
they pass on beta/stable builds even if the features are restricted to dev/trunk. BUG=136629 TEST=no Review URL: https://chromiumcodereview.appspot.com/10704149 TBR=mpcomplete@chromium.org Review URL: https://chromiumcodereview.appspot.com/10735060 git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@146161 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc4
-rw-r--r--chrome/browser/extensions/lazy_background_page_apitest.cc2
-rw-r--r--chrome/common/extensions/manifest_tests/extension_manifests_background_unittest.cc2
3 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index ccf9297..619c3f4 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -29,6 +29,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/extensions/features/feature.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
@@ -57,6 +58,9 @@ void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) {
// This enables DOM automation for tab contentses.
EnableDOMAutomation();
+ extensions::Feature::SetChannelForTesting(
+ chrome::VersionInfo::CHANNEL_UNKNOWN);
+
PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_);
test_data_dir_ = test_data_dir_.AppendASCII("extensions");
diff --git a/chrome/browser/extensions/lazy_background_page_apitest.cc b/chrome/browser/extensions/lazy_background_page_apitest.cc
index 5441af6..31b7fca 100644
--- a/chrome/browser/extensions/lazy_background_page_apitest.cc
+++ b/chrome/browser/extensions/lazy_background_page_apitest.cc
@@ -70,7 +70,7 @@ class LoadedIncognitoObserver : public content::NotificationObserver {
} // namespace
class LazyBackgroundPageApiTest : public ExtensionApiTest {
-public:
+ public:
void SetUpCommandLine(CommandLine* command_line) {
ExtensionApiTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_background_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_background_unittest.cc
index b63fcde..3832329 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_background_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_background_unittest.cc
@@ -11,6 +11,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_error_utils.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "chrome/common/extensions/features/feature.h"
#include "chrome/common/extensions/features/simple_feature_provider.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -87,6 +88,7 @@ TEST_F(ExtensionManifestTest, BackgroundAllowNoJsAccess) {
TEST_F(ExtensionManifestTest, BackgroundPageWebRequest) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableExperimentalExtensionApis);
+ Feature::SetChannelForTesting(chrome::VersionInfo::CHANNEL_UNKNOWN);
std::string error;
scoped_ptr<DictionaryValue> manifest(