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

Side by Side Diff: extensions/common/manifest_handlers/shared_module_manifest_unittest.cc

Issue 82773002: Move some dependencies of ExtensionService down to extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Presubmit check fixed Created 7 years 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
« no previous file with comments | « extensions/common/manifest_handlers/shared_module_info.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/version.h" 5 #include "base/version.h"
6 #include "chrome/common/extensions/manifest_handlers/shared_module_info.h"
7 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" 6 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
8 #include "extensions/common/extension.h" 7 #include "extensions/common/extension.h"
8 #include "extensions/common/manifest_handlers/shared_module_info.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace { 11 namespace {
12 12
13 const char* kValidImportPath = 13 const char* kValidImportPath =
14 "_modules/abcdefghijklmnopabcdefghijklmnop/foo/bar.html"; 14 "_modules/abcdefghijklmnopabcdefghijklmnop/foo/bar.html";
15 const char* kValidImportPathID = "abcdefghijklmnopabcdefghijklmnop"; 15 const char* kValidImportPathID = "abcdefghijklmnopabcdefghijklmnop";
16 const char* kValidImportPathRelative = "foo/bar.html"; 16 const char* kValidImportPathRelative = "foo/bar.html";
17 const char* kInvalidImportPath = "_modules/abc/foo.html"; 17 const char* kInvalidImportPath = "_modules/abc/foo.html";
18 const char* kImportId1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 18 const char* kImportId1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
19 const char* kImportId2 = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; 19 const char* kImportId2 = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
20 const char* kNoImport = "cccccccccccccccccccccccccccccccc"; 20 const char* kNoImport = "cccccccccccccccccccccccccccccccc";
21 21
22 } 22 } // namespace
23 23
24 namespace extensions { 24 namespace extensions {
25 25
26 class SharedModuleManifestTest : public ExtensionManifestTest { 26 class SharedModuleManifestTest : public ExtensionManifestTest {
27 }; 27 };
28 28
29 TEST_F(SharedModuleManifestTest, ExportsAll) { 29 TEST_F(SharedModuleManifestTest, ExportsAll) {
30 Manifest manifest("shared_module_export.json"); 30 Manifest manifest("shared_module_export.json");
31 31
32 scoped_refptr<Extension> extension = LoadAndExpectSuccess(manifest); 32 scoped_refptr<Extension> extension = LoadAndExpectSuccess(manifest);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 "Invalid value for 'import'."), 111 "Invalid value for 'import'."),
112 Testcase("shared_module_import_invalid_id.json", 112 Testcase("shared_module_import_invalid_id.json",
113 "Invalid value for 'import[0].id'."), 113 "Invalid value for 'import[0].id'."),
114 Testcase("shared_module_import_invalid_version.json", 114 Testcase("shared_module_import_invalid_version.json",
115 "Invalid value for 'import[0].minimum_version'."), 115 "Invalid value for 'import[0].minimum_version'."),
116 }; 116 };
117 RunTestcases(testcases, arraysize(testcases), EXPECT_TYPE_ERROR); 117 RunTestcases(testcases, arraysize(testcases), EXPECT_TYPE_ERROR);
118 } 118 }
119 119
120 } // namespace extensions 120 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/manifest_handlers/shared_module_info.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698