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

Unified Diff: chrome/common/extensions/api/file_system_provider/file_system_provider_handler_unittest.cc

Issue 1133013002: Improve parsing manifest for FSP API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/file_system_provider/file_system_provider_handler_unittest.cc
diff --git a/chrome/common/extensions/api/file_system_provider/file_system_provider_handler_unittest.cc b/chrome/common/extensions/api/file_system_provider/file_system_provider_handler_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..677f261f8219a1e47531365bd9fcdbd764f2ac43
--- /dev/null
+++ b/chrome/common/extensions/api/file_system_provider/file_system_provider_handler_unittest.cc
@@ -0,0 +1,31 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h"
+#include "extensions/common/manifest_constants.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace extensions {
+
+class FileSystemProviderHandlerTest : public ChromeManifestTest {};
+
+TEST_F(FileSystemProviderHandlerTest, Valid) {
+ RunTestcase(Testcase("filesystemprovider_valid.json"), EXPECT_TYPE_SUCCESS);
+}
+
+TEST_F(FileSystemProviderHandlerTest, Invalid_MissingCapabilities) {
+ RunTestcase(
+ Testcase("filesystemprovider_missing_capabilities.json",
+ manifest_errors::kInvalidFileSystemProviderMissingCapabilities),
+ EXPECT_TYPE_ERROR);
+}
+
+TEST_F(FileSystemProviderHandlerTest, Invalid_MissingPermission) {
+ RunTestcase(
+ Testcase("filesystemprovider_missing_permission.json",
+ manifest_errors::kInvalidFileSystemProviderMissingPermission),
+ EXPECT_TYPE_WARNING);
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698