| 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 #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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } else if (type == extension_installed_bubble::kApp) { | 106 } else if (type == extension_installed_bubble::kApp) { |
| 107 extension_input_value.SetString(keys::kName, "test app"); | 107 extension_input_value.SetString(keys::kName, "test app"); |
| 108 extension_input_value.SetString(keys::kLaunchWebURL, | 108 extension_input_value.SetString(keys::kLaunchWebURL, |
| 109 "http://www.example.com"); | 109 "http://www.example.com"); |
| 110 } | 110 } |
| 111 | 111 |
| 112 std::string error; | 112 std::string error; |
| 113 scoped_refptr<Extension> extension = | 113 scoped_refptr<Extension> extension = |
| 114 Extension::Create(path, Extension::INVALID, extension_input_value, | 114 Extension::Create(path, extensions::Manifest::INVALID_LOCATION, |
| 115 Extension::NO_FLAGS, &error); | 115 extension_input_value, Extension::NO_FLAGS, &error); |
| 116 extension_service_->AddExtension(extension); | 116 extension_service_->AddExtension(extension); |
| 117 return extension; | 117 return extension; |
| 118 } | 118 } |
| 119 | 119 |
| 120 // Required to initialize the extension installed bubble. | 120 // Required to initialize the extension installed bubble. |
| 121 NSWindow* window_; // weak, owned by CocoaProfileTest. | 121 NSWindow* window_; // weak, owned by CocoaProfileTest. |
| 122 | 122 |
| 123 ExtensionService* extension_service_; | 123 ExtensionService* extension_service_; |
| 124 | 124 |
| 125 // Skeleton extension to be tested; reinitialized for each test. | 125 // Skeleton extension to be tested; reinitialized for each test. |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 int minHeight = extension_installed_bubble::kIconSize + | 304 int minHeight = extension_installed_bubble::kIconSize + |
| 305 (2 * extension_installed_bubble::kOuterVerticalMargin); | 305 (2 * extension_installed_bubble::kOuterVerticalMargin); |
| 306 EXPECT_GT(height, minHeight); | 306 EXPECT_GT(height, minHeight); |
| 307 | 307 |
| 308 // Make sure the "show me" link is visible. | 308 // Make sure the "show me" link is visible. |
| 309 EXPECT_FALSE([[controller appInstalledShortcutLink] isHidden]); | 309 EXPECT_FALSE([[controller appInstalledShortcutLink] isHidden]); |
| 310 | 310 |
| 311 [controller close]; | 311 [controller close]; |
| 312 } | 312 } |
| 313 | 313 |
| OLD | NEW |