| 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);
|
| +}
|
|
|