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

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

Issue 8983010: Convert WebContents to return a content::NavigationController instead of the implementation. Upda... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/string_util.h" 6 #include "base/string_util.h"
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autocomplete/autocomplete_edit.h" 9 #include "chrome/browser/autocomplete/autocomplete_edit.h"
10 #include "chrome/browser/content_settings/host_content_settings_map.h" 10 #include "chrome/browser/content_settings/host_content_settings_map.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/ui/omnibox/omnibox_view.h" 23 #include "chrome/browser/ui/omnibox/omnibox_view.h"
24 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 24 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
25 #include "chrome/common/chrome_notification_types.h" 25 #include "chrome/common/chrome_notification_types.h"
26 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
28 #include "chrome/common/url_constants.h" 28 #include "chrome/common/url_constants.h"
29 #include "chrome/test/base/in_process_browser_test.h" 29 #include "chrome/test/base/in_process_browser_test.h"
30 #include "chrome/test/base/ui_test_utils.h" 30 #include "chrome/test/base/ui_test_utils.h"
31 #include "content/browser/renderer_host/render_view_host.h" 31 #include "content/browser/renderer_host/render_view_host.h"
32 #include "content/browser/renderer_host/render_widget_host_view.h" 32 #include "content/browser/renderer_host/render_widget_host_view.h"
33 #include "content/browser/tab_contents/navigation_controller.h" 33 #include "content/public/browser/navigation_controller.h"
34 #include "content/public/browser/notification_service.h" 34 #include "content/public/browser/notification_service.h"
35 #include "content/public/browser/web_contents.h" 35 #include "content/public/browser/web_contents.h"
36 #include "grit/generated_resources.h" 36 #include "grit/generated_resources.h"
37 #include "ui/base/l10n/l10n_util.h" 37 #include "ui/base/l10n/l10n_util.h"
38 38
39 using content::WebContents; 39 using content::WebContents;
40 40
41 // Tests are flaky on Linux because of http://crbug.com/80118. 41 // Tests are flaky on Linux because of http://crbug.com/80118.
42 #if defined(OS_LINUX) 42 #if defined(OS_LINUX)
43 #define MAYBE(TestName) DISABLED_ ## TestName 43 #define MAYBE(TestName) DISABLED_ ## TestName
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 // Press <Enter> in the omnibox, causing the preview to be committed. 1001 // Press <Enter> in the omnibox, causing the preview to be committed.
1002 WebContents* preview_tab = preview()->web_contents(); 1002 WebContents* preview_tab = preview()->web_contents();
1003 ASSERT_TRUE(PressEnter()); 1003 ASSERT_TRUE(PressEnter());
1004 1004
1005 // The preview contents should now be the active tab contents. 1005 // The preview contents should now be the active tab contents.
1006 EXPECT_FALSE(preview()); 1006 EXPECT_FALSE(preview());
1007 EXPECT_FALSE(instant()->is_displayable()); 1007 EXPECT_FALSE(instant()->is_displayable());
1008 EXPECT_FALSE(instant()->IsCurrent()); 1008 EXPECT_FALSE(instant()->IsCurrent());
1009 EXPECT_EQ(preview_tab, browser()->GetSelectedWebContents()); 1009 EXPECT_EQ(preview_tab, browser()->GetSelectedWebContents());
1010 } 1010 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698