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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc

Issue 11419276: Remove tabstrip wrappers in browser_tabstrip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/search_engines/template_url.h" 21 #include "chrome/browser/search_engines/template_url.h"
22 #include "chrome/browser/search_engines/template_url_service.h" 22 #include "chrome/browser/search_engines/template_url_service.h"
23 #include "chrome/browser/search_engines/template_url_service_factory.h" 23 #include "chrome/browser/search_engines/template_url_service_factory.h"
24 #include "chrome/browser/ui/browser.h" 24 #include "chrome/browser/ui/browser.h"
25 #include "chrome/browser/ui/browser_commands.h" 25 #include "chrome/browser/ui/browser_commands.h"
26 #include "chrome/browser/ui/browser_tabstrip.h" 26 #include "chrome/browser/ui/browser_tabstrip.h"
27 #include "chrome/browser/ui/browser_window.h" 27 #include "chrome/browser/ui/browser_window.h"
28 #include "chrome/browser/ui/omnibox/location_bar.h" 28 #include "chrome/browser/ui/omnibox/location_bar.h"
29 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" 29 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h"
30 #include "chrome/browser/ui/omnibox/omnibox_view.h" 30 #include "chrome/browser/ui/omnibox/omnibox_view.h"
31 #include "chrome/browser/ui/tabs/tab_strip_model.h"
31 #include "chrome/common/chrome_notification_types.h" 32 #include "chrome/common/chrome_notification_types.h"
32 #include "chrome/common/chrome_paths.h" 33 #include "chrome/common/chrome_paths.h"
33 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
34 #include "chrome/test/base/interactive_test_utils.h" 35 #include "chrome/test/base/interactive_test_utils.h"
35 #include "chrome/test/base/in_process_browser_test.h" 36 #include "chrome/test/base/in_process_browser_test.h"
36 #include "chrome/test/base/ui_test_utils.h" 37 #include "chrome/test/base/ui_test_utils.h"
37 #include "content/public/browser/notification_service.h" 38 #include "content/public/browser/notification_service.h"
38 #include "content/public/browser/web_contents.h" 39 #include "content/public/browser/web_contents.h"
39 #include "net/base/mock_host_resolver.h" 40 #include "net/base/mock_host_resolver.h"
40 #include "ui/base/events/event_constants.h" 41 #include "ui/base/events/event_constants.h"
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 ASSERT_FALSE(omnibox_view->model()->is_keyword_hint()); 1248 ASSERT_FALSE(omnibox_view->model()->is_keyword_hint());
1248 ASSERT_EQ(kSearchKeyword, UTF16ToUTF8(omnibox_view->model()->keyword())); 1249 ASSERT_EQ(kSearchKeyword, UTF16ToUTF8(omnibox_view->model()->keyword()));
1249 1250
1250 // Input something as search text. 1251 // Input something as search text.
1251 ASSERT_NO_FATAL_FAILURE(SendKeySequence(kSearchTextKeys)); 1252 ASSERT_NO_FATAL_FAILURE(SendKeySequence(kSearchTextKeys));
1252 1253
1253 // Create a new tab. 1254 // Create a new tab.
1254 chrome::NewTab(browser()); 1255 chrome::NewTab(browser());
1255 1256
1256 // Switch back to the first tab. 1257 // Switch back to the first tab.
1257 chrome::ActivateTabAt(browser(), 0, true); 1258 browser()->tab_strip_model()->ActivateTabAt(0, true);
1258 1259
1259 // Make sure we're still in keyword mode. 1260 // Make sure we're still in keyword mode.
1260 ASSERT_EQ(kSearchKeyword, UTF16ToUTF8(omnibox_view->model()->keyword())); 1261 ASSERT_EQ(kSearchKeyword, UTF16ToUTF8(omnibox_view->model()->keyword()));
1261 } 1262 }
1262 1263
1263 void CtrlKeyPressedWithInlineAutocompleteTest() { 1264 void CtrlKeyPressedWithInlineAutocompleteTest() {
1264 OmniboxView* omnibox_view = NULL; 1265 OmniboxView* omnibox_view = NULL;
1265 ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); 1266 ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view));
1266 OmniboxPopupModel* popup_model = omnibox_view->model()->popup_model(); 1267 OmniboxPopupModel* popup_model = omnibox_view->model()->popup_model();
1267 ASSERT_TRUE(popup_model); 1268 ASSERT_TRUE(popup_model);
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 1684
1684 // Middle-clicking shouldn't select all the text either. 1685 // Middle-clicking shouldn't select all the text either.
1685 ASSERT_NO_FATAL_FAILURE( 1686 ASSERT_NO_FATAL_FAILURE(
1686 ClickFocusViewOrigin(ui_controls::LEFT, kClickOffset, kClickOffset)); 1687 ClickFocusViewOrigin(ui_controls::LEFT, kClickOffset, kClickOffset));
1687 ASSERT_NO_FATAL_FAILURE(ClickBrowserWindowCenter()); 1688 ASSERT_NO_FATAL_FAILURE(ClickBrowserWindowCenter());
1688 ASSERT_NO_FATAL_FAILURE( 1689 ASSERT_NO_FATAL_FAILURE(
1689 ClickFocusViewOrigin(ui_controls::MIDDLE, kClickOffset, kClickOffset)); 1690 ClickFocusViewOrigin(ui_controls::MIDDLE, kClickOffset, kClickOffset));
1690 EXPECT_FALSE(omnibox_view->IsSelectAll()); 1691 EXPECT_FALSE(omnibox_view->IsSelectAll());
1691 } 1692 }
1692 #endif // defined(USE_AURA) 1693 #endif // defined(USE_AURA)
OLDNEW
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_controller.cc ('k') | chrome/browser/ui/search/search_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698