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

Unified Diff: chrome/common/extensions/manifest_tests/extension_manifests_contentsecuritypolicy_unittest.cc

Issue 10828363: Improve error message for insecure 'content_security_policy' manifest entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Aaron's sentence. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/manifest_tests/extension_manifests_contentsecuritypolicy_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_contentsecuritypolicy_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_contentsecuritypolicy_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..950bc4cb505a97d02d9cc26c6db3aceb17db94af
--- /dev/null
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_contentsecuritypolicy_unittest.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2012 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/extension_manifest_test.h"
+
+#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace errors = extension_manifest_errors;
+
+TEST_F(ExtensionManifestTest, InsecureContentSecurityPolicy) {
+ Testcase testcases[] = {
+ Testcase("insecure_contentsecuritypolicy_1.json",
+ errors::kInsecureContentSecurityPolicy),
+ Testcase("insecure_contentsecuritypolicy_2.json",
+ errors::kInsecureContentSecurityPolicy),
+ Testcase("insecure_contentsecuritypolicy_3.json",
+ errors::kInsecureContentSecurityPolicy),
+ };
+ RunTestcases(testcases, arraysize(testcases),
+ EXPECT_TYPE_ERROR);
+}

Powered by Google App Engine
This is Rietveld 408576698