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

Side by Side Diff: chrome/browser/instant/instant_browsertest.cc

Issue 5610005: Makes instant run before unload listeners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Better comments Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_window.h" 10 #include "chrome/browser/browser_window.h"
11 #include "chrome/browser/instant/instant_controller.h" 11 #include "chrome/browser/instant/instant_controller.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/renderer_host/render_view_host.h" 13 #include "chrome/browser/renderer_host/render_view_host.h"
14 #include "chrome/browser/search_engines/template_url.h" 14 #include "chrome/browser/search_engines/template_url.h"
15 #include "chrome/browser/search_engines/template_url_model.h" 15 #include "chrome/browser/search_engines/template_url_model.h"
16 #include "chrome/browser/tab_contents/tab_contents.h" 16 #include "chrome/browser/tab_contents/tab_contents.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/omnibox/location_bar.h" 18 #include "chrome/browser/ui/omnibox/location_bar.h"
19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome/test/in_process_browser_test.h" 21 #include "chrome/test/in_process_browser_test.h"
22 #include "chrome/test/ui_test_utils.h" 22 #include "chrome/test/ui_test_utils.h"
23 23
24
Charlie Reis 2010/12/08 01:26:12 I was hoping to see a new test in here. :) I thi
sky 2010/12/08 03:04:22 I completely agree about adding a test. I plan on
25 class InstantTest : public InProcessBrowserTest { 24 class InstantTest : public InProcessBrowserTest {
26 public: 25 public:
27 InstantTest() 26 InstantTest()
28 : location_bar_(NULL), 27 : location_bar_(NULL),
29 preview_(NULL) { 28 preview_(NULL) {
30 EnableDOMAutomation(); 29 EnableDOMAutomation();
31 } 30 }
32 31
33 void SetupInstantProvider(const std::string& page) { 32 void SetupInstantProvider(const std::string& page) {
34 TemplateURLModel* model = browser()->profile()->GetTemplateURLModel(); 33 TemplateURLModel* model = browser()->profile()->GetTemplateURLModel();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // Check that the value is reflected and oncancel is called. 230 // Check that the value is reflected and oncancel is called.
232 EXPECT_NO_FATAL_FAILURE(CheckBoolValueFromJavascript( 231 EXPECT_NO_FATAL_FAILURE(CheckBoolValueFromJavascript(
233 true, "window.chrome.sv", contents)); 232 true, "window.chrome.sv", contents));
234 EXPECT_NO_FATAL_FAILURE(CheckStringValueFromJavascript( 233 EXPECT_NO_FATAL_FAILURE(CheckStringValueFromJavascript(
235 "abc", "window.chrome.searchBox.value", contents)); 234 "abc", "window.chrome.searchBox.value", contents));
236 EXPECT_NO_FATAL_FAILURE(CheckBoolValueFromJavascript( 235 EXPECT_NO_FATAL_FAILURE(CheckBoolValueFromJavascript(
237 false, "window.chrome.searchBox.verbatim", contents)); 236 false, "window.chrome.searchBox.verbatim", contents));
238 EXPECT_NO_FATAL_FAILURE(CheckIntValueFromJavascript( 237 EXPECT_NO_FATAL_FAILURE(CheckIntValueFromJavascript(
239 1, "window.oncancelcalls", contents)); 238 1, "window.oncancelcalls", contents));
240 } 239 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_unload_handler.h » ('j') | chrome/browser/instant/instant_unload_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698