Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / search / instant_extended_interactive_uitest.cc
index bed2ab1..ba6d84c 100644 (file)
@@ -44,7 +44,6 @@
 #include "chrome/browser/ui/webui/theme_source.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/instant_types.h"
-#include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/interactive_test_utils.h"
@@ -57,6 +56,7 @@
 #include "components/omnibox/autocomplete_match.h"
 #include "components/omnibox/autocomplete_provider.h"
 #include "components/omnibox/autocomplete_result.h"
+#include "components/omnibox/omnibox_field_trial.h"
 #include "components/omnibox/search_provider.h"
 #include "components/search_engines/template_url_service.h"
 #include "components/sessions/serialized_navigation_entry.h"
@@ -90,17 +90,15 @@ class QuittingHistoryDBTask : public history::HistoryDBTask {
  public:
   QuittingHistoryDBTask() {}
 
-  virtual bool RunOnDBThread(history::HistoryBackend* backend,
-                             history::HistoryDatabase* db) OVERRIDE {
+  bool RunOnDBThread(history::HistoryBackend* backend,
+                     history::HistoryDatabase* db) override {
     return true;
   }
 
-  virtual void DoneRunOnMainThread() OVERRIDE {
-    base::MessageLoop::current()->Quit();
-  }
+  void DoneRunOnMainThread() override { base::MessageLoop::current()->Quit(); }
 
  private:
-  virtual ~QuittingHistoryDBTask() {}
+  ~QuittingHistoryDBTask() override {}
 
   DISALLOW_COPY_AND_ASSIGN(QuittingHistoryDBTask);
 };
@@ -109,7 +107,7 @@ class FakeNetworkChangeNotifier : public net::NetworkChangeNotifier {
  public:
   FakeNetworkChangeNotifier() : connection_type_(CONNECTION_NONE) {}
 
-  virtual ConnectionType GetCurrentConnectionType() const OVERRIDE {
+  ConnectionType GetCurrentConnectionType() const override {
     return connection_type_;
   }
 
@@ -119,7 +117,7 @@ class FakeNetworkChangeNotifier : public net::NetworkChangeNotifier {
     base::RunLoop().RunUntilIdle();
   }
 
-  virtual ~FakeNetworkChangeNotifier() {}
+  ~FakeNetworkChangeNotifier() override {}
 
  private:
   ConnectionType connection_type_;
@@ -143,7 +141,7 @@ class InstantExtendedTest : public InProcessBrowserTest,
         on_toggle_voice_search_calls_(0) {
   }
  protected:
-  virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
+  void SetUpInProcessBrowserTestFixture() override {
     chrome::EnableQueryExtractionForTesting();
     ASSERT_TRUE(https_test_server().Start());
     GURL instant_url = https_test_server().GetURL(
@@ -258,7 +256,7 @@ class InstantExtendedPrefetchTest : public InstantExtendedTest {
         fake_factory_(new net::FakeURLFetcherFactory(factory_.get())) {
   }
 
-  virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
+  void SetUpInProcessBrowserTestFixture() override {
     chrome::EnableQueryExtractionForTesting();
     ASSERT_TRUE(https_test_server().Start());
     GURL instant_url = https_test_server().GetURL(
@@ -268,7 +266,7 @@ class InstantExtendedPrefetchTest : public InstantExtendedTest {
     InstantTestBase::Init(instant_url, ntp_url, true);
   }
 
-  virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+  void SetUpCommandLine(CommandLine* command_line) override {
     command_line->AppendSwitchASCII(
         switches::kForceFieldTrials,
         "EmbeddedSearch/Group11 prefetch_results_srp:1/");
@@ -288,13 +286,13 @@ class InstantExtendedPrefetchTest : public InstantExtendedTest {
 
 class InstantExtendedNetworkTest : public InstantExtendedTest {
  protected:
-  virtual void SetUpOnMainThread() OVERRIDE {
+  void SetUpOnMainThread() override {
     disable_for_test_.reset(new net::NetworkChangeNotifier::DisableForTest);
     fake_network_change_notifier_.reset(new FakeNetworkChangeNotifier);
     InstantExtendedTest::SetUpOnMainThread();
   }
 
-  virtual void TearDownOnMainThread() OVERRIDE {
+  void TearDownOnMainThread() override {
     InstantExtendedTest::TearDownOnMainThread();
     fake_network_change_notifier_.reset();
     disable_for_test_.reset();
@@ -317,7 +315,7 @@ class InstantPolicyTest : public ExtensionBrowserTest, public InstantTestBase {
   InstantPolicyTest() {}
 
  protected:
-  virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
+  void SetUpInProcessBrowserTestFixture() override {
     ASSERT_TRUE(https_test_server().Start());
     GURL instant_url = https_test_server().GetURL(
         "files/instant_extended.html?strk=1&");
@@ -816,8 +814,7 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedPrefetchTest, SetPrefetchQuery) {
       ui_test_utils::BROWSER_TEST_NONE);
   new_tab_observer.Wait();
 
-  omnibox()->model()->autocomplete_controller()->search_provider()->
-      kMinimumTimeBetweenSuggestQueriesMs = 0;
+  OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs = 0;
 
   // Set the fake response for search query.
   fake_factory()->SetFakeResponse(instant_url().Resolve("#q=flowers"),
@@ -879,8 +876,7 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedPrefetchTest, ClearPrefetchedResults) {
       ui_test_utils::BROWSER_TEST_NONE);
   new_tab_observer.Wait();
 
-  omnibox()->model()->autocomplete_controller()->search_provider()->
-      kMinimumTimeBetweenSuggestQueriesMs = 0;
+  OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs = 0;
 
   // Set the fake response for search query.
   fake_factory()->SetFakeResponse(instant_url().Resolve("#q=flowers"),