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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_install_view_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 #import "base/mac/scoped_nsobject.h" 7 #import "base/mac/scoped_nsobject.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #import "chrome/browser/extensions/extension_install_prompt.h" 10 #import "chrome/browser/extensions/extension_install_prompt.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 EXPECT_TRUE([controller outlineView]); 244 EXPECT_TRUE([controller outlineView]);
245 EXPECT_TRUE([[[controller outlineView] enclosingScrollView] isHidden]); 245 EXPECT_TRUE([[[controller outlineView] enclosingScrollView] isHidden]);
246 EXPECT_TRUE([controller warningsSeparator]); 246 EXPECT_TRUE([controller warningsSeparator]);
247 EXPECT_TRUE([[controller warningsSeparator] isHidden]); 247 EXPECT_TRUE([[controller warningsSeparator] isHidden]);
248 } 248 }
249 249
250 TEST_F(ExtensionInstallViewControllerTest, OAuthIssues) { 250 TEST_F(ExtensionInstallViewControllerTest, OAuthIssues) {
251 chrome::MockExtensionInstallPromptDelegate delegate; 251 chrome::MockExtensionInstallPromptDelegate delegate;
252 252
253 ExtensionInstallPrompt::Prompt prompt = 253 ExtensionInstallPrompt::Prompt prompt =
254 chrome::BuildExtensionInstallPrompt(extension_); 254 chrome::BuildExtensionInstallPrompt(extension_.get());
255 std::vector<string16> permissions; 255 std::vector<string16> permissions;
256 permissions.push_back(UTF8ToUTF16("warning 1")); 256 permissions.push_back(UTF8ToUTF16("warning 1"));
257 prompt.SetPermissions(permissions); 257 prompt.SetPermissions(permissions);
258 IssueAdviceInfoEntry issue; 258 IssueAdviceInfoEntry issue;
259 issue.description = UTF8ToUTF16("issue description 1"); 259 issue.description = UTF8ToUTF16("issue description 1");
260 issue.details.push_back(UTF8ToUTF16("issue detail 1")); 260 issue.details.push_back(UTF8ToUTF16("issue detail 1"));
261 IssueAdviceInfo issues; 261 IssueAdviceInfo issues;
262 issues.push_back(issue); 262 issues.push_back(issue);
263 prompt.SetOAuthIssueAdvice(issues); 263 prompt.SetOAuthIssueAdvice(issues);
264 264
(...skipping 27 matching lines...) Expand all
292 prompt:prompt]); 292 prompt:prompt]);
293 293
294 [controller view]; // Force nib load. 294 [controller view]; // Force nib load.
295 295
296 EXPECT_TRUE([controller cancelButton]); 296 EXPECT_TRUE([controller cancelButton]);
297 EXPECT_FALSE([controller okButton]); 297 EXPECT_FALSE([controller okButton]);
298 298
299 [controller cancel:nil]; 299 [controller cancel:nil];
300 EXPECT_EQ(1, delegate.abort_count()); 300 EXPECT_EQ(1, delegate.abort_count());
301 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698