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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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_tab_util.h" 10 #include "chrome/browser/extensions/extension_tab_util.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 EXPECT_TRUE(listener.WaitUntilSatisfied()); 92 EXPECT_TRUE(listener.WaitUntilSatisfied());
93 Browser* new_browser = NULL; 93 Browser* new_browser = NULL;
94 { 94 {
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 content::PAGE_TRANSITION_TYPED, false))); 102 ui::PAGE_TRANSITION_TYPED, false)));
103 #if defined(OS_WIN) 103 #if defined(OS_WIN)
104 // Hide all the buttons to test that it opens even when browser action is 104 // Hide all the buttons to test that it opens even when browser action is
105 // in the overflow bucket. 105 // in the overflow bucket.
106 // TODO(justinlin): Implement for other platforms. 106 // TODO(justinlin): Implement for other platforms.
107 browserActionBar.SetIconVisibilityCount(0); 107 browserActionBar.SetIconVisibilityCount(0);
108 #endif 108 #endif
109 frame_observer.Wait(); 109 frame_observer.Wait();
110 } 110 }
111 111
112 EXPECT_TRUE(new_browser != NULL); 112 EXPECT_TRUE(new_browser != NULL);
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 EXPECT_NE(static_cast<gfx::NativeView>(NULL), view); 332 EXPECT_NE(static_cast<gfx::NativeView>(NULL), view);
333 const HWND hwnd = views::HWNDForNativeView(view); 333 const HWND hwnd = views::HWNDForNativeView(view);
334 EXPECT_EQ(hwnd, 334 EXPECT_EQ(hwnd,
335 views::HWNDForNativeView(browser()->window()->GetNativeWindow())); 335 views::HWNDForNativeView(browser()->window()->GetNativeWindow()));
336 EXPECT_EQ(TRUE, ::IsWindow(hwnd)); 336 EXPECT_EQ(TRUE, ::IsWindow(hwnd));
337 337
338 // Create a new browser window to prevent the message loop from terminating. 338 // Create a new browser window to prevent the message loop from terminating.
339 Browser* new_browser = chrome::FindBrowserWithWebContents( 339 Browser* new_browser = chrome::FindBrowserWithWebContents(
340 browser()->OpenURL(content::OpenURLParams( 340 browser()->OpenURL(content::OpenURLParams(
341 GURL("about:"), content::Referrer(), NEW_WINDOW, 341 GURL("about:"), content::Referrer(), NEW_WINDOW,
342 content::PAGE_TRANSITION_TYPED, false))); 342 ui::PAGE_TRANSITION_TYPED, false)));
343 343
344 // Forcibly closing the browser HWND should not cause a crash. 344 // Forcibly closing the browser HWND should not cause a crash.
345 EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); 345 EXPECT_EQ(TRUE, ::CloseWindow(hwnd));
346 EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); 346 EXPECT_EQ(TRUE, ::DestroyWindow(hwnd));
347 EXPECT_EQ(FALSE, ::IsWindow(hwnd)); 347 EXPECT_EQ(FALSE, ::IsWindow(hwnd));
348 } 348 }
349 #endif // OS_WIN 349 #endif // OS_WIN
350 350
351 } // namespace 351 } // namespace
352 } // namespace extensions 352 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698