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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_apitest.cc

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 #include <map> 5 #include <map>
6 6
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 9
10 using extensions::Extension; 10 using extensions::Extension;
(...skipping 14 matching lines...) Expand all
25 protected: 25 protected:
26 void LoadNamedExtension(const FilePath& path, 26 void LoadNamedExtension(const FilePath& path,
27 const std::string& name) { 27 const std::string& name) {
28 const Extension* extension = LoadExtension(path.AppendASCII(name)); 28 const Extension* extension = LoadExtension(path.AppendASCII(name));
29 ASSERT_TRUE(extension); 29 ASSERT_TRUE(extension);
30 extension_name_to_ids_[name] = extension->id(); 30 extension_name_to_ids_[name] = extension->id();
31 } 31 }
32 32
33 void InstallNamedExtension(const FilePath& path, 33 void InstallNamedExtension(const FilePath& path,
34 const std::string& name, 34 const std::string& name,
35 Extension::Location install_source) { 35 Manifest::Location install_source) {
36 const Extension* extension = InstallExtension(path.AppendASCII(name), 1, 36 const Extension* extension = InstallExtension(path.AppendASCII(name), 1,
37 install_source); 37 install_source);
38 ASSERT_TRUE(extension); 38 ASSERT_TRUE(extension);
39 extension_name_to_ids_[name] = extension->id(); 39 extension_name_to_ids_[name] = extension->id();
40 } 40 }
41 41
42 std::map<std::string, std::string> extension_name_to_ids_; 42 std::map<std::string, std::string> extension_name_to_ids_;
43 }; 43 };
44 44
45 IN_PROC_BROWSER_TEST_F(DeveloperPrivateApiTest, Basics) { 45 IN_PROC_BROWSER_TEST_F(DeveloperPrivateApiTest, Basics) {
46 LoadExtensions(); 46 LoadExtensions();
47 47
48 FilePath basedir = test_data_dir_.AppendASCII("developer"); 48 FilePath basedir = test_data_dir_.AppendASCII("developer");
49 InstallNamedExtension(basedir, "packaged_app", Extension::INTERNAL); 49 InstallNamedExtension(basedir, "packaged_app", Manifest::INTERNAL);
50 50
51 InstallNamedExtension(basedir, "simple_extension", Extension::INTERNAL); 51 InstallNamedExtension(basedir, "simple_extension", Manifest::INTERNAL);
52 52
53 ASSERT_TRUE(RunExtensionSubtest( 53 ASSERT_TRUE(RunExtensionSubtest(
54 "developer/test", "basics.html", kFlagLoadAsComponent)); 54 "developer/test", "basics.html", kFlagLoadAsComponent));
55 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698