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

Side by Side Diff: chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc

Issue 1241063003: Support Component Actions in the toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch GetComponentActionId to unix_hacker_style. Created 5 years, 4 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
OLDNEW
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/extensions/browser_action_test_util.h" 5 #include "chrome/browser/extensions/browser_action_test_util.h"
6 #include "chrome/browser/extensions/extension_action.h" 6 #include "chrome/browser/extensions/extension_action.h"
7 #include "chrome/browser/extensions/extension_action_manager.h" 7 #include "chrome/browser/extensions/extension_action_manager.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_toolbar_model.h"
11 #include "chrome/browser/sessions/session_tab_helper.h" 10 #include "chrome/browser/sessions/session_tab_helper.h"
12 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_commands.h" 12 #include "chrome/browser/ui/browser_commands.h"
14 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
15 #include "chrome/browser/ui/browser_list.h" 14 #include "chrome/browser/ui/browser_list.h"
16 #include "chrome/browser/ui/browser_window.h" 15 #include "chrome/browser/ui/browser_window.h"
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" 16 #include "chrome/browser/ui/tabs/tab_strip_model.h"
17 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
18 #include "chrome/test/base/interactive_test_utils.h" 18 #include "chrome/test/base/interactive_test_utils.h"
19 #include "chrome/test/base/ui_test_utils.h" 19 #include "chrome/test/base/ui_test_utils.h"
20 #include "content/public/browser/notification_service.h" 20 #include "content/public/browser/notification_service.h"
21 #include "extensions/browser/extension_registry.h" 21 #include "extensions/browser/extension_registry.h"
22 #include "extensions/browser/extension_system.h" 22 #include "extensions/browser/extension_system.h"
23 #include "extensions/common/extension.h" 23 #include "extensions/common/extension.h"
24 #include "extensions/common/extension_set.h" 24 #include "extensions/common/extension_set.h"
25 #include "extensions/common/permissions/permissions_data.h" 25 #include "extensions/common/permissions/permissions_data.h"
26 #include "extensions/test/extension_test_message_listener.h" 26 #include "extensions/test/extension_test_message_listener.h"
27 #include "extensions/test/result_catcher.h" 27 #include "extensions/test/result_catcher.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 content::WindowedNotificationObserver frame_observer( 95 content::WindowedNotificationObserver frame_observer(
96 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, 96 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
97 content::NotificationService::AllSources()); 97 content::NotificationService::AllSources());
98 // Open a new window. 98 // Open a new window.
99 new_browser = chrome::FindBrowserWithWebContents( 99 new_browser = chrome::FindBrowserWithWebContents(
100 browser()->OpenURL(content::OpenURLParams( 100 browser()->OpenURL(content::OpenURLParams(
101 GURL("about:"), content::Referrer(), NEW_WINDOW, 101 GURL("about:"), content::Referrer(), NEW_WINDOW,
102 ui::PAGE_TRANSITION_TYPED, false))); 102 ui::PAGE_TRANSITION_TYPED, false)));
103 // Hide all the buttons to test that it opens even when the browser action 103 // Hide all the buttons to test that it opens even when the browser action
104 // is in the overflow bucket. 104 // is in the overflow bucket.
105 extensions::ExtensionToolbarModel::Get(profile())->SetVisibleIconCount(0); 105 ToolbarActionsModel::Get(profile())->SetVisibleIconCount(0);
106 frame_observer.Wait(); 106 frame_observer.Wait();
107 } 107 }
108 108
109 EXPECT_TRUE(new_browser != NULL); 109 EXPECT_TRUE(new_browser != NULL);
110 110
111 // Flaky on non-aura linux http://crbug.com/309749 111 // Flaky on non-aura linux http://crbug.com/309749
112 #if !(defined(OS_LINUX) && !defined(USE_AURA)) 112 #if !(defined(OS_LINUX) && !defined(USE_AURA))
113 ResultCatcher catcher; 113 ResultCatcher catcher;
114 { 114 {
115 content::WindowedNotificationObserver frame_observer( 115 content::WindowedNotificationObserver frame_observer(
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 // Forcibly closing the browser HWND should not cause a crash. 370 // Forcibly closing the browser HWND should not cause a crash.
371 EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); 371 EXPECT_EQ(TRUE, ::CloseWindow(hwnd));
372 EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); 372 EXPECT_EQ(TRUE, ::DestroyWindow(hwnd));
373 EXPECT_EQ(FALSE, ::IsWindow(hwnd)); 373 EXPECT_EQ(FALSE, ::IsWindow(hwnd));
374 } 374 }
375 #endif // OS_WIN 375 #endif // OS_WIN
376 376
377 } // namespace 377 } // namespace
378 } // namespace extensions 378 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698