Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2274)

Unified Diff: chrome/browser/ui/browser_instant_controller_unittest.cc

Issue 265393007: Test fixes and clean up in preparation for moving DSE to Prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eriks test fixes Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_instant_controller_unittest.cc
diff --git a/chrome/browser/ui/browser_instant_controller_unittest.cc b/chrome/browser/ui/browser_instant_controller_unittest.cc
index d93ef568efb308b7ddae7d1ecc4d2f0df35a9418..089c8071a617b2b5b6f04109c702fd27d95153a7 100644
--- a/chrome/browser/ui/browser_instant_controller_unittest.cc
+++ b/chrome/browser/ui/browser_instant_controller_unittest.cc
@@ -6,6 +6,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_vector.h"
+#include "base/metrics/field_trial.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/search/instant_service.h"
#include "chrome/browser/search/instant_service_observer.h"
@@ -29,6 +30,18 @@ class BrowserInstantControllerTest : public InstantUnitTestBase {
friend class FakeWebContentsObserver;
};
+class BrowserInstantControllerEmbeddedTest : public InstantUnitTestBase {
Peter Kasting 2014/05/06 19:49:00 Why not just do this on BrowserInstantControllerTe
Cait (Slow) 2014/05/06 20:10:53 I tried this and it broke GoogleBaseURLUpdated to
+ public:
+ virtual void SetUp() OVERRIDE {
+ ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
+ "EmbeddedSearch", "Group1 use_cacheable_ntp:1 prefetch_results:1"));
+ InstantUnitTestBase::SetUp();
+ }
+
+ protected:
+ friend class FakeWebContentsObserver;
+};
+
const struct TabReloadTestCase {
const char* description;
const char* start_url;
@@ -82,7 +95,7 @@ class FakeWebContentsObserver : public content::WebContentsObserver {
int num_reloads_;
};
-TEST_F(BrowserInstantControllerTest, DefaultSearchProviderChanged) {
+TEST_F(BrowserInstantControllerEmbeddedTest, DefaultSearchProviderChanged) {
size_t num_tests = arraysize(kTabReloadTestCases);
ScopedVector<FakeWebContentsObserver> observers;
for (size_t i = 0; i < num_tests; ++i) {

Powered by Google App Engine
This is Rietveld 408576698