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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 "extensions/browser/app_window/native_app_window.h" 5 #include "extensions/browser/app_window/native_app_window.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #import "base/mac/mac_util.h" 10 #import "base/mac/mac_util.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 } // namespace 177 } // namespace
178 178
179 // Test Hide/Show and Hide/ShowWithApp() behavior when shims are enabled. 179 // Test Hide/Show and Hide/ShowWithApp() behavior when shims are enabled.
180 IN_PROC_BROWSER_TEST_P(NativeAppWindowCocoaBrowserTest, 180 IN_PROC_BROWSER_TEST_P(NativeAppWindowCocoaBrowserTest,
181 HideShowWithAppWithShim) { 181 HideShowWithAppWithShim) {
182 test::AppShimHostManagerTestApi test_api( 182 test::AppShimHostManagerTestApi test_api(
183 g_browser_process->platform_part()->app_shim_host_manager()); 183 g_browser_process->platform_part()->app_shim_host_manager());
184 MockExtensionAppShimHandler* mock = new MockExtensionAppShimHandler(); 184 MockExtensionAppShimHandler* mock = new MockExtensionAppShimHandler();
185 test_api.SetExtensionAppShimHandler( 185 test_api.SetExtensionAppShimHandler(
186 scoped_ptr<apps::ExtensionAppShimHandler>(mock)); // Takes ownership. 186 std::unique_ptr<apps::ExtensionAppShimHandler>(
187 mock)); // Takes ownership.
187 MockAppShimHost mock_host; 188 MockAppShimHost mock_host;
188 189
189 SetUpAppWithWindows(1); 190 SetUpAppWithWindows(1);
190 extensions::AppWindowRegistry::AppWindowList windows = 191 extensions::AppWindowRegistry::AppWindowList windows =
191 extensions::AppWindowRegistry::Get(profile())->app_windows(); 192 extensions::AppWindowRegistry::Get(profile())->app_windows();
192 193
193 extensions::AppWindow* app_window = windows.front(); 194 extensions::AppWindow* app_window = windows.front();
194 extensions::NativeAppWindow* native_window = app_window->GetBaseWindow(); 195 extensions::NativeAppWindow* native_window = app_window->GetBaseWindow();
195 NSWindow* ns_window = native_window->GetNativeWindow(); 196 NSWindow* ns_window = native_window->GetNativeWindow();
196 197
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 [expected_color getComponents:expected_components]; 697 [expected_color getComponents:expected_components];
697 [color getComponents:color_components]; 698 [color getComponents:color_components];
698 EXPECT_NEAR(expected_components[0], color_components[0], 0.01); 699 EXPECT_NEAR(expected_components[0], color_components[0], 0.01);
699 EXPECT_NEAR(expected_components[1], color_components[1], 0.01); 700 EXPECT_NEAR(expected_components[1], color_components[1], 0.01);
700 EXPECT_NEAR(expected_components[2], color_components[2], 0.01); 701 EXPECT_NEAR(expected_components[2], color_components[2], 0.01);
701 } 702 }
702 703
703 INSTANTIATE_TEST_CASE_P(NativeAppWindowCocoaBrowserTestInstance, 704 INSTANTIATE_TEST_CASE_P(NativeAppWindowCocoaBrowserTestInstance,
704 NativeAppWindowCocoaBrowserTest, 705 NativeAppWindowCocoaBrowserTest,
705 ::testing::Bool()); 706 ::testing::Bool());
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698