| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "chrome/browser/ui/search/instant_test_utils.h" | 5 #include "chrome/browser/ui/search/instant_test_utils.h" | 
| 6 | 6 | 
| 7 #include <stddef.h> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/prefs/pref_service.h" |  | 
| 11 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" | 
| 12 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" | 
| 13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" | 
| 14 #include "chrome/browser/search_engines/template_url_service_factory.h" | 13 #include "chrome/browser/search_engines/template_url_service_factory.h" | 
| 15 #include "chrome/browser/ui/search/search_tab_helper.h" | 14 #include "chrome/browser/ui/search/search_tab_helper.h" | 
| 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 
| 17 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" | 
| 18 #include "chrome/test/base/interactive_test_utils.h" | 17 #include "chrome/test/base/interactive_test_utils.h" | 
| 19 #include "chrome/test/base/search_test_utils.h" | 18 #include "chrome/test/base/search_test_utils.h" | 
| 20 #include "components/omnibox/browser/omnibox_view.h" | 19 #include "components/omnibox/browser/omnibox_view.h" | 
|  | 20 #include "components/prefs/pref_service.h" | 
| 21 #include "components/search_engines/template_url_service.h" | 21 #include "components/search_engines/template_url_service.h" | 
| 22 #include "components/variations/entropy_provider.h" | 22 #include "components/variations/entropy_provider.h" | 
| 23 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" | 
| 24 #include "content/public/browser/render_process_host.h" | 24 #include "content/public/browser/render_process_host.h" | 
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" | 
| 26 #include "content/public/common/result_codes.h" | 26 #include "content/public/common/result_codes.h" | 
| 27 #include "content/public/test/browser_test_utils.h" | 27 #include "content/public/test/browser_test_utils.h" | 
| 28 | 28 | 
| 29 namespace { | 29 namespace { | 
| 30 | 30 | 
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 169   return content::ExecuteScriptAndExtractBool(rvh, js_chrome, loaded); | 169   return content::ExecuteScriptAndExtractBool(rvh, js_chrome, loaded); | 
| 170 } | 170 } | 
| 171 | 171 | 
| 172 base::string16 InstantTestBase::GetBlueText() { | 172 base::string16 InstantTestBase::GetBlueText() { | 
| 173   size_t start = 0, end = 0; | 173   size_t start = 0, end = 0; | 
| 174   omnibox()->GetSelectionBounds(&start, &end); | 174   omnibox()->GetSelectionBounds(&start, &end); | 
| 175   if (start > end) | 175   if (start > end) | 
| 176     std::swap(start, end); | 176     std::swap(start, end); | 
| 177   return omnibox()->GetText().substr(start, end - start); | 177   return omnibox()->GetText().substr(start, end - start); | 
| 178 } | 178 } | 
| OLD | NEW | 
|---|