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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm

Issue 18346006: Update OS X to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } else if (type == extension_installed_bubble::kApp) { 104 } else if (type == extension_installed_bubble::kApp) {
105 extension_input_value.SetString(keys::kName, "test app"); 105 extension_input_value.SetString(keys::kName, "test app");
106 extension_input_value.SetString(keys::kLaunchWebURL, 106 extension_input_value.SetString(keys::kLaunchWebURL,
107 "http://www.example.com"); 107 "http://www.example.com");
108 } 108 }
109 109
110 std::string error; 110 std::string error;
111 scoped_refptr<Extension> extension = 111 scoped_refptr<Extension> extension =
112 Extension::Create(path, extensions::Manifest::INVALID_LOCATION, 112 Extension::Create(path, extensions::Manifest::INVALID_LOCATION,
113 extension_input_value, Extension::NO_FLAGS, &error); 113 extension_input_value, Extension::NO_FLAGS, &error);
114 extension_service_->AddExtension(extension); 114 extension_service_->AddExtension(extension.get());
115 return extension; 115 return extension;
116 } 116 }
117 117
118 // Required to initialize the extension installed bubble. 118 // Required to initialize the extension installed bubble.
119 NSWindow* window_; // weak, owned by CocoaProfileTest. 119 NSWindow* window_; // weak, owned by CocoaProfileTest.
120 120
121 ExtensionService* extension_service_; 121 ExtensionService* extension_service_;
122 122
123 // Skeleton extension to be tested; reinitialized for each test. 123 // Skeleton extension to be tested; reinitialized for each test.
124 scoped_refptr<Extension> extension_; 124 scoped_refptr<Extension> extension_;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 int minHeight = extension_installed_bubble::kIconSize + 303 int minHeight = extension_installed_bubble::kIconSize +
304 (2 * extension_installed_bubble::kOuterVerticalMargin); 304 (2 * extension_installed_bubble::kOuterVerticalMargin);
305 EXPECT_GT(height, minHeight); 305 EXPECT_GT(height, minHeight);
306 306
307 // Make sure the "show me" link is visible. 307 // Make sure the "show me" link is visible.
308 EXPECT_FALSE([[controller appInstalledShortcutLink] isHidden]); 308 EXPECT_FALSE([[controller appInstalledShortcutLink] isHidden]);
309 309
310 [controller close]; 310 [controller close];
311 } 311 }
312 312
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698