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

Side by Side Diff: chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac_interactive_uitest.mm

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #import "chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h" 5 #import "chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #import <Carbon/Carbon.h> 8 #import <Carbon/Carbon.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 30 matching lines...) Expand all
41 const Extension* extension = 41 const Extension* extension =
42 LoadAndLaunchPlatformApp("minimal", "Launched"); 42 LoadAndLaunchPlatformApp("minimal", "Launched");
43 43
44 // First create an extra app window and an extra browser window. Only after 44 // First create an extra app window and an extra browser window. Only after
45 // the first call to ui_test_utils::ShowAndFocusNativeWindow(..) will the 45 // the first call to ui_test_utils::ShowAndFocusNativeWindow(..) will the
46 // windows activate, because the test binary has a default activation policy 46 // windows activate, because the test binary has a default activation policy
47 // of "prohibited". 47 // of "prohibited".
48 app1_ = GetFirstAppWindow(); 48 app1_ = GetFirstAppWindow();
49 app2_ = CreateAppWindow(extension); 49 app2_ = CreateAppWindow(extension);
50 browser1_ = browser()->window(); 50 browser1_ = browser()->window();
51 browser2_ = (new Browser(Browser::CreateParams( 51 browser2_ = (new Browser(Browser::CreateParams(profile())))->window();
52 profile(), chrome::HOST_DESKTOP_TYPE_NATIVE)))->window();
53 browser2_->Show(); 52 browser2_->Show();
54 53
55 // Since a pending key status change on any window could cause the test to 54 // Since a pending key status change on any window could cause the test to
56 // become flaky, watch everything closely. 55 // become flaky, watch everything closely.
57 app1_watcher_.reset([[WindowedNSNotificationObserver alloc] 56 app1_watcher_.reset([[WindowedNSNotificationObserver alloc]
58 initForNotification:NSWindowDidBecomeMainNotification 57 initForNotification:NSWindowDidBecomeMainNotification
59 object:app1_->GetNativeWindow()]); 58 object:app1_->GetNativeWindow()]);
60 app2_watcher_.reset([[WindowedNSNotificationObserver alloc] 59 app2_watcher_.reset([[WindowedNSNotificationObserver alloc]
61 initForNotification:NSWindowDidBecomeMainNotification 60 initForNotification:NSWindowDidBecomeMainNotification
62 object:app2_->GetNativeWindow()]); 61 object:app2_->GetNativeWindow()]);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Activate one of the browsers. Then cycling should go between the browsers. 125 // Activate one of the browsers. Then cycling should go between the browsers.
127 EXPECT_TRUE(ShowAndFocusNativeWindow(browser1_->GetNativeWindow())); 126 EXPECT_TRUE(ShowAndFocusNativeWindow(browser1_->GetNativeWindow()));
128 ExpectActiveWithCounts(browser1_->GetNativeWindow(), 2, 1, 1, 0); 127 ExpectActiveWithCounts(browser1_->GetNativeWindow(), 2, 1, 1, 0);
129 CycleWindows(); 128 CycleWindows();
130 ExpectActiveWithCounts(browser2_->GetNativeWindow(), 2, 1, 1, 1); 129 ExpectActiveWithCounts(browser2_->GetNativeWindow(), 2, 1, 1, 1);
131 CycleWindows(); 130 CycleWindows();
132 ExpectActiveWithCounts(browser1_->GetNativeWindow(), 2, 1, 2, 1); 131 ExpectActiveWithCounts(browser1_->GetNativeWindow(), 2, 1, 2, 1);
133 } 132 }
134 133
135 } // namespace 134 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698