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

Side by Side Diff: extensions/shell/browser/shell_native_app_window_aura_unittest.cc

Issue 2252373002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shell/browser/shell_native_app_window_aura.h" 5 #include "extensions/shell/browser/shell_native_app_window_aura.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 .Set("version", "1") 48 .Set("version", "1")
49 .Set("manifest_version", 2) 49 .Set("manifest_version", 2)
50 .Build()) 50 .Build())
51 .Build(); 51 .Build();
52 52
53 AppWindow* app_window = new AppWindow( 53 AppWindow* app_window = new AppWindow(
54 browser_context.get(), new ShellAppDelegate, extension.get()); 54 browser_context.get(), new ShellAppDelegate, extension.get());
55 content::WebContents* web_contents = content::WebContents::Create( 55 content::WebContents* web_contents = content::WebContents::Create(
56 content::WebContents::CreateParams(browser_context.get())); 56 content::WebContents::CreateParams(browser_context.get()));
57 app_window->SetAppWindowContentsForTesting( 57 app_window->SetAppWindowContentsForTesting(
58 base::WrapUnique(new TestAppWindowContents(web_contents))); 58 base::MakeUnique<TestAppWindowContents>(web_contents));
59 59
60 AppWindow::BoundsSpecification window_spec; 60 AppWindow::BoundsSpecification window_spec;
61 window_spec.bounds = gfx::Rect(100, 200, 300, 400); 61 window_spec.bounds = gfx::Rect(100, 200, 300, 400);
62 AppWindow::CreateParams params; 62 AppWindow::CreateParams params;
63 params.window_spec = window_spec; 63 params.window_spec = window_spec;
64 64
65 ShellNativeAppWindowAura window(app_window, params); 65 ShellNativeAppWindowAura window(app_window, params);
66 66
67 gfx::Rect bounds = window.GetBounds(); 67 gfx::Rect bounds = window.GetBounds();
68 EXPECT_EQ(window_spec.bounds, bounds); 68 EXPECT_EQ(window_spec.bounds, bounds);
69 69
70 // Delete the AppWindow. 70 // Delete the AppWindow.
71 app_window->OnNativeClose(); 71 app_window->OnNativeClose();
72 } 72 }
73 73
74 } // namespace extensions 74 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698