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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_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) 2011 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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 action_list->Append(action); 93 action_list->Append(action);
94 extension_input_value.Set(keys::kPageActions, action_list); 94 extension_input_value.Set(keys::kPageActions, action_list);
95 } else { 95 } else {
96 extension_input_value.SetString(keys::kName, "browser action extension"); 96 extension_input_value.SetString(keys::kName, "browser action extension");
97 DictionaryValue* browser_action = new DictionaryValue; 97 DictionaryValue* browser_action = new DictionaryValue;
98 // An empty dictionary is enough to create a Browser Action. 98 // An empty dictionary is enough to create a Browser Action.
99 extension_input_value.Set(keys::kBrowserAction, browser_action); 99 extension_input_value.Set(keys::kBrowserAction, browser_action);
100 } 100 }
101 101
102 std::string error; 102 std::string error;
103 return Extension::Create( 103 return Extension::Create(path, Extension::INVALID, extension_input_value,
104 path, Extension::INVALID, extension_input_value, false, true, &error); 104 Extension::STRICT_ERROR_CHECKS, &error);
105 } 105 }
106 106
107 // Allows us to create the window and browser for testing. 107 // Allows us to create the window and browser for testing.
108 BrowserTestHelper helper_; 108 BrowserTestHelper helper_;
109 109
110 // Required to initialize the extension installed bubble. 110 // Required to initialize the extension installed bubble.
111 NSWindow* window_; // weak, owned by BrowserTestHelper. 111 NSWindow* window_; // weak, owned by BrowserTestHelper.
112 112
113 // Required to initialize the extension installed bubble. 113 // Required to initialize the extension installed bubble.
114 Browser* browser_; // weak, owned by BrowserTestHelper. 114 Browser* browser_; // weak, owned by BrowserTestHelper.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 extension_installed_bubble::kOuterVerticalMargin); 193 extension_installed_bubble::kOuterVerticalMargin);
194 NSRect msg1Frame = [controller getExtensionInstalledMsgFrame]; 194 NSRect msg1Frame = [controller getExtensionInstalledMsgFrame];
195 // Top message should start kInnerVerticalMargin pixels above top of 195 // Top message should start kInnerVerticalMargin pixels above top of
196 // extensionInstalled message, because page action message is hidden. 196 // extensionInstalled message, because page action message is hidden.
197 EXPECT_EQ(msg1Frame.origin.y, 197 EXPECT_EQ(msg1Frame.origin.y,
198 msg3Frame.origin.y + msg3Frame.size.height + 198 msg3Frame.origin.y + msg3Frame.size.height +
199 extension_installed_bubble::kInnerVerticalMargin); 199 extension_installed_bubble::kInnerVerticalMargin);
200 200
201 [controller close]; 201 [controller close];
202 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698