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

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

Issue 6766002: Replace bools in extension creation with flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 9 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 std::string error; 54 std::string error;
55 JSONFileValueSerializer serializer(path); 55 JSONFileValueSerializer serializer(path);
56 scoped_ptr<DictionaryValue> value(static_cast<DictionaryValue*>( 56 scoped_ptr<DictionaryValue> value(static_cast<DictionaryValue*>(
57 serializer.Deserialize(NULL, &error))); 57 serializer.Deserialize(NULL, &error)));
58 if (!value.get()) { 58 if (!value.get()) {
59 LOG(ERROR) << error; 59 LOG(ERROR) << error;
60 return; 60 return;
61 } 61 }
62 62
63 extension_ = Extension::Create( 63 extension_ = Extension::Create(path.DirName(), Extension::INVALID, *value,
64 path.DirName(), Extension::INVALID, *value, false, true, &error); 64 Extension::STRICT_ERROR_CHECKS, &error);
65 if (!extension_.get()) { 65 if (!extension_.get()) {
66 LOG(ERROR) << error; 66 LOG(ERROR) << error;
67 return; 67 return;
68 } 68 }
69 } 69 }
70 70
71 BrowserTestHelper helper_; 71 BrowserTestHelper helper_;
72 FilePath test_data_dir_; 72 FilePath test_data_dir_;
73 SkBitmap icon_; 73 SkBitmap icon_;
74 scoped_refptr<Extension> extension_; 74 scoped_refptr<Extension> extension_;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 EXPECT_NE('^', [[[controller cancelButton] stringValue] characterAtIndex:0]); 282 EXPECT_NE('^', [[[controller cancelButton] stringValue] characterAtIndex:0]);
283 283
284 EXPECT_TRUE([controller okButton] != nil); 284 EXPECT_TRUE([controller okButton] != nil);
285 EXPECT_NE(0u, [[[controller okButton] stringValue] length]); 285 EXPECT_NE(0u, [[[controller okButton] stringValue] length]);
286 EXPECT_NE('^', [[[controller okButton] stringValue] characterAtIndex:0]); 286 EXPECT_NE('^', [[[controller okButton] stringValue] characterAtIndex:0]);
287 287
288 EXPECT_TRUE([controller subtitleField] == nil); 288 EXPECT_TRUE([controller subtitleField] == nil);
289 EXPECT_TRUE([controller warningsField] == nil); 289 EXPECT_TRUE([controller warningsField] == nil);
290 EXPECT_TRUE([controller warningsBox] == nil); 290 EXPECT_TRUE([controller warningsBox] == nil);
291 } 291 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698