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

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

Issue 565423003: Move extensions manifest tests to run in extensions_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (manifest2) fix deps, android Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/common/extensions/manifest_tests/chrome_manifest_test.h"
6 #include "extensions/common/manifest_constants.h" 5 #include "extensions/common/manifest_constants.h"
7 #include "extensions/common/manifest_handlers/file_handler_info.h" 6 #include "extensions/common/manifest_handlers/file_handler_info.h"
7 #include "extensions/common/manifest_test.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 11
12 namespace errors = manifest_errors; 12 namespace errors = manifest_errors;
13 13
14 // TODO(jamescook): Convert from ChromeManifestTest to ManifestTest. 14 typedef ManifestTest FileHandlersManifestTest;
15 class FileHandlersManifestTest : public ChromeManifestTest {
16 };
17 15
18 TEST_F(FileHandlersManifestTest, InvalidFileHandlers) { 16 TEST_F(FileHandlersManifestTest, InvalidFileHandlers) {
19 Testcase testcases[] = { 17 Testcase testcases[] = {
20 Testcase("file_handlers_invalid_handlers.json", 18 Testcase("file_handlers_invalid_handlers.json",
21 errors::kInvalidFileHandlers), 19 errors::kInvalidFileHandlers),
22 Testcase("file_handlers_invalid_type.json", 20 Testcase("file_handlers_invalid_type.json",
23 errors::kInvalidFileHandlerType), 21 errors::kInvalidFileHandlerType),
24 Testcase("file_handlers_invalid_extension.json", 22 Testcase("file_handlers_invalid_extension.json",
25 errors::kInvalidFileHandlerExtension), 23 errors::kInvalidFileHandlerExtension),
26 Testcase("file_handlers_invalid_no_type_or_extension.json", 24 Testcase("file_handlers_invalid_no_type_or_extension.json",
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 scoped_refptr<const Extension> extension = 63 scoped_refptr<const Extension> extension =
66 LoadAndExpectSuccess("file_handlers_invalid_not_app.json"); 64 LoadAndExpectSuccess("file_handlers_invalid_not_app.json");
67 65
68 ASSERT_TRUE(extension.get()); 66 ASSERT_TRUE(extension.get());
69 const FileHandlersInfo* handlers = 67 const FileHandlersInfo* handlers =
70 FileHandlers::GetFileHandlers(extension.get()); 68 FileHandlers::GetFileHandlers(extension.get());
71 ASSERT_TRUE(handlers == NULL); 69 ASSERT_TRUE(handlers == NULL);
72 } 70 }
73 71
74 } // namespace extensions 72 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698