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

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

Issue 311193005: Add the about_page key to shared_module manifest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 6 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_about_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_about_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_about_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5911fef39a63187597d3fba41ee6dc975beae844
--- /dev/null
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_about_unittest.cc
@@ -0,0 +1,29 @@
+// 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/manifest_url_handler.h"
+#include "extensions/common/manifest_constants.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace errors = extensions::manifest_errors;
+
+class AboutPageManifestTest : public ExtensionManifestTest {};
+
+TEST_F(AboutPageManifestTest, AboutPageInSharedModules) {
+ scoped_refptr<extensions::Extension> extension;
+ extension = LoadAndExpectSuccess("shared_module_about.json");
+ EXPECT_EQ(GURL("chrome-extension://" + extension->id() + "/about.html"),
+ extensions::ManifestURL::GetAboutPage(extension.get()));
+
+ Testcase testcases[] = {
+ // Forbid data types other than strings.
+ Testcase("shared_module_about_invalid_type.json",
+ errors::kInvalidAboutPage),
+
+ // Forbid absolute URLs.
+ Testcase("shared_module_about_absolute.json",
+ errors::kInvalidAboutPageExpectRelativePath)};
+ RunTestcases(testcases, arraysize(testcases), EXPECT_TYPE_ERROR);
+}
« no previous file with comments | « chrome/common/extensions/chrome_manifest_handlers.cc ('k') | chrome/common/extensions/manifest_url_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698