| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/command_line.h" | 5 #include "base/command_line.h" | 
| 6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" | 
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" | 
| 8 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 8 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 
| 9 #include "chrome/browser/browser_list.h" | 9 #include "chrome/browser/browser_list.h" | 
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" | 
| 11 #include "chrome/browser/browser_window.h" | 11 #include "chrome/browser/browser_window.h" | 
| 12 #include "chrome/browser/instant/instant_controller.h" | 12 #include "chrome/browser/instant/instant_controller.h" | 
| 13 #include "chrome/browser/location_bar.h" | 13 #include "chrome/browser/location_bar.h" | 
| 14 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profile.h" | 
| 15 #include "chrome/browser/renderer_host/render_view_host.h" | 15 #include "chrome/browser/renderer_host/render_view_host.h" | 
| 16 #include "chrome/browser/search_engines/template_url.h" | 16 #include "chrome/browser/search_engines/template_url.h" | 
| 17 #include "chrome/browser/search_engines/template_url_model.h" | 17 #include "chrome/browser/search_engines/template_url_model.h" | 
| 18 #include "chrome/browser/tab_contents/tab_contents.h" | 18 #include "chrome/browser/tab_contents/tab_contents.h" | 
| 19 #include "chrome/browser/tab_contents_wrapper.h" | 19 #include "chrome/browser/tab_contents_wrapper.h" | 
| 20 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" | 
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" | 
| 22 #include "chrome/test/in_process_browser_test.h" | 22 #include "chrome/test/in_process_browser_test.h" | 
| 23 #include "chrome/test/ui_test_utils.h" | 23 #include "chrome/test/ui_test_utils.h" | 
| 24 | 24 | 
| 25 |  | 
| 26 class InstantTest : public InProcessBrowserTest { | 25 class InstantTest : public InProcessBrowserTest { | 
| 27  public: | 26  public: | 
| 28   InstantTest() | 27   InstantTest() | 
| 29       : location_bar_(NULL), | 28       : location_bar_(NULL), | 
| 30         preview_(NULL) { | 29         preview_(NULL) { | 
| 31     EnableDOMAutomation(); | 30     EnableDOMAutomation(); | 
| 32   } | 31   } | 
| 33 | 32 | 
| 34   void SetupInstantProvider(const std::string& page) { | 33   void SetupInstantProvider(const std::string& page) { | 
| 35     TemplateURLModel* model = browser()->profile()->GetTemplateURLModel(); | 34     TemplateURLModel* model = browser()->profile()->GetTemplateURLModel(); | 
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 232   // Check that the value is reflected and oncancel is called. | 231   // Check that the value is reflected and oncancel is called. | 
| 233   EXPECT_NO_FATAL_FAILURE(CheckBoolValueFromJavascript( | 232   EXPECT_NO_FATAL_FAILURE(CheckBoolValueFromJavascript( | 
| 234       true, "window.chrome.sv", contents)); | 233       true, "window.chrome.sv", contents)); | 
| 235   EXPECT_NO_FATAL_FAILURE(CheckStringValueFromJavascript( | 234   EXPECT_NO_FATAL_FAILURE(CheckStringValueFromJavascript( | 
| 236       "abc", "window.chrome.searchBox.value", contents)); | 235       "abc", "window.chrome.searchBox.value", contents)); | 
| 237   EXPECT_NO_FATAL_FAILURE(CheckBoolValueFromJavascript( | 236   EXPECT_NO_FATAL_FAILURE(CheckBoolValueFromJavascript( | 
| 238       false, "window.chrome.searchBox.verbatim", contents)); | 237       false, "window.chrome.searchBox.verbatim", contents)); | 
| 239   EXPECT_NO_FATAL_FAILURE(CheckIntValueFromJavascript( | 238   EXPECT_NO_FATAL_FAILURE(CheckIntValueFromJavascript( | 
| 240       1, "window.oncancelcalls", contents)); | 239       1, "window.oncancelcalls", contents)); | 
| 241 } | 240 } | 
| OLD | NEW | 
|---|