OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |