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

Side by Side Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 12578008: Move CrxFile, FileReader, ExtensionResource to src/extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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) 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 25 matching lines...) Expand all
36 #include "chrome/common/extensions/extension_manifest_constants.h" 36 #include "chrome/common/extensions/extension_manifest_constants.h"
37 #include "chrome/common/extensions/extension_set.h" 37 #include "chrome/common/extensions/extension_set.h"
38 #include "chrome/common/extensions/manifest_handler.h" 38 #include "chrome/common/extensions/manifest_handler.h"
39 #include "chrome/test/base/ui_test_utils.h" 39 #include "chrome/test/base/ui_test_utils.h"
40 #include "content/public/browser/navigation_controller.h" 40 #include "content/public/browser/navigation_controller.h"
41 #include "content/public/browser/navigation_entry.h" 41 #include "content/public/browser/navigation_entry.h"
42 #include "content/public/browser/notification_registrar.h" 42 #include "content/public/browser/notification_registrar.h"
43 #include "content/public/browser/notification_service.h" 43 #include "content/public/browser/notification_service.h"
44 #include "content/public/browser/render_view_host.h" 44 #include "content/public/browser/render_view_host.h"
45 #include "content/public/test/browser_test_utils.h" 45 #include "content/public/test/browser_test_utils.h"
46 #include "extensions/common/constants.h"
46 #include "sync/api/string_ordinal.h" 47 #include "sync/api/string_ordinal.h"
47 48
48 using extensions::Extension; 49 using extensions::Extension;
49 using extensions::ExtensionCreator; 50 using extensions::ExtensionCreator;
50 using extensions::FeatureSwitch; 51 using extensions::FeatureSwitch;
51 using extensions::Manifest; 52 using extensions::Manifest;
52 53
53 ExtensionBrowserTest::ExtensionBrowserTest() 54 ExtensionBrowserTest::ExtensionBrowserTest()
54 : loaded_(false), 55 : loaded_(false),
55 installed_(false), 56 installed_(false),
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 const Extension* extension = service->extensions()->GetByID(extension_id); 225 const Extension* extension = service->extensions()->GetByID(extension_id);
225 if (!extension) 226 if (!extension)
226 return NULL; 227 return NULL;
227 last_loaded_extension_id_ = extension->id(); 228 last_loaded_extension_id_ = extension->id();
228 return extension; 229 return extension;
229 } 230 }
230 231
231 const Extension* ExtensionBrowserTest::LoadExtensionAsComponent( 232 const Extension* ExtensionBrowserTest::LoadExtensionAsComponent(
232 const base::FilePath& path) { 233 const base::FilePath& path) {
233 return LoadExtensionAsComponentWithManifest(path, 234 return LoadExtensionAsComponentWithManifest(path,
234 Extension::kManifestFilename); 235 extensions::kManifestFilename);
235 } 236 }
236 237
237 base::FilePath ExtensionBrowserTest::PackExtension( 238 base::FilePath ExtensionBrowserTest::PackExtension(
238 const base::FilePath& dir_path) { 239 const base::FilePath& dir_path) {
239 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx"); 240 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx");
240 if (!file_util::Delete(crx_path, false)) { 241 if (!file_util::Delete(crx_path, false)) {
241 ADD_FAILURE() << "Failed to delete crx: " << crx_path.value(); 242 ADD_FAILURE() << "Failed to delete crx: " << crx_path.value();
242 return base::FilePath(); 243 return base::FilePath();
243 } 244 }
244 245
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 case content::NOTIFICATION_LOAD_STOP: 727 case content::NOTIFICATION_LOAD_STOP:
727 VLOG(1) << "Got LOAD_STOP notification."; 728 VLOG(1) << "Got LOAD_STOP notification.";
728 MessageLoopForUI::current()->Quit(); 729 MessageLoopForUI::current()->Quit();
729 break; 730 break;
730 731
731 default: 732 default:
732 NOTREACHED(); 733 NOTREACHED();
733 break; 734 break;
734 } 735 }
735 } 736 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698