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

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

Issue 12093036: Move Extension Location and Type enums to Manifest, and move InstallWarning to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 extension_input_value.Set(keys::kPageActions, action_list); 100 extension_input_value.Set(keys::kPageActions, action_list);
101 } else { 101 } else {
102 extension_input_value.SetString(keys::kName, "browser action extension"); 102 extension_input_value.SetString(keys::kName, "browser action extension");
103 DictionaryValue* browser_action = new DictionaryValue; 103 DictionaryValue* browser_action = new DictionaryValue;
104 // An empty dictionary is enough to create a Browser Action. 104 // An empty dictionary is enough to create a Browser Action.
105 extension_input_value.Set(keys::kBrowserAction, browser_action); 105 extension_input_value.Set(keys::kBrowserAction, browser_action);
106 } 106 }
107 107
108 std::string error; 108 std::string error;
109 scoped_refptr<Extension> extension = 109 scoped_refptr<Extension> extension =
110 Extension::Create(path, Extension::INVALID, extension_input_value, 110 Extension::Create(path, extensions::Manifest::INVALID_LOCATION,
111 Extension::NO_FLAGS, &error); 111 extension_input_value, Extension::NO_FLAGS, &error);
112 extension_service_->AddExtension(extension); 112 extension_service_->AddExtension(extension);
113 return extension; 113 return extension;
114 } 114 }
115 115
116 // Required to initialize the extension installed bubble. 116 // Required to initialize the extension installed bubble.
117 NSWindow* window_; // weak, owned by CocoaProfileTest. 117 NSWindow* window_; // weak, owned by CocoaProfileTest.
118 118
119 ExtensionService* extension_service_; 119 ExtensionService* extension_service_;
120 120
121 // Skeleton extension to be tested; reinitialized for each test. 121 // Skeleton extension to be tested; reinitialized for each test.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 // The bubble window goes from visible to not-visible. 273 // The bubble window goes from visible to not-visible.
274 EXPECT_TRUE([bubbleWindow isVisible]); 274 EXPECT_TRUE([bubbleWindow isVisible]);
275 [window_ close]; 275 [window_ close];
276 EXPECT_FALSE([bubbleWindow isVisible]); 276 EXPECT_FALSE([bubbleWindow isVisible]);
277 277
278 [[NSNotificationCenter defaultCenter] removeObserver:observer]; 278 [[NSNotificationCenter defaultCenter] removeObserver:observer];
279 279
280 // Check that the appropriate notification was received. 280 // Check that the appropriate notification was received.
281 EXPECT_OCMOCK_VERIFY(observer); 281 EXPECT_OCMOCK_VERIFY(observer);
282 } 282 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698