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 #include "chrome/browser/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 std::string extension_id = service->component_loader()->Add(manifest, path); | 226 std::string extension_id = service->component_loader()->Add(manifest, path); |
227 const Extension* extension = service->extensions()->GetByID(extension_id); | 227 const Extension* extension = service->extensions()->GetByID(extension_id); |
228 if (!extension) | 228 if (!extension) |
229 return NULL; | 229 return NULL; |
230 last_loaded_extension_id_ = extension->id(); | 230 last_loaded_extension_id_ = extension->id(); |
231 return extension; | 231 return extension; |
232 } | 232 } |
233 | 233 |
234 const Extension* ExtensionBrowserTest::LoadExtensionAsComponent( | 234 const Extension* ExtensionBrowserTest::LoadExtensionAsComponent( |
235 const base::FilePath& path) { | 235 const base::FilePath& path) { |
236 return LoadExtensionAsComponentWithManifest(path, | 236 return LoadExtensionAsComponentWithManifest( |
237 extensions::kManifestFilename); | 237 path, extensions::filenames::kManifestFilename); |
238 } | 238 } |
239 | 239 |
240 base::FilePath ExtensionBrowserTest::PackExtension( | 240 base::FilePath ExtensionBrowserTest::PackExtension( |
241 const base::FilePath& dir_path) { | 241 const base::FilePath& dir_path) { |
242 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx"); | 242 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx"); |
243 if (!base::DeleteFile(crx_path, false)) { | 243 if (!base::DeleteFile(crx_path, false)) { |
244 ADD_FAILURE() << "Failed to delete crx: " << crx_path.value(); | 244 ADD_FAILURE() << "Failed to delete crx: " << crx_path.value(); |
245 return base::FilePath(); | 245 return base::FilePath(); |
246 } | 246 } |
247 | 247 |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 case content::NOTIFICATION_LOAD_STOP: | 734 case content::NOTIFICATION_LOAD_STOP: |
735 VLOG(1) << "Got LOAD_STOP notification."; | 735 VLOG(1) << "Got LOAD_STOP notification."; |
736 base::MessageLoopForUI::current()->Quit(); | 736 base::MessageLoopForUI::current()->Quit(); |
737 break; | 737 break; |
738 | 738 |
739 default: | 739 default: |
740 NOTREACHED(); | 740 NOTREACHED(); |
741 break; | 741 break; |
742 } | 742 } |
743 } | 743 } |
OLD | NEW |