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

Side by Side Diff: chrome/common/extensions/manifest_tests/extension_manifests_about_unittest.cc

Issue 574173002: Reland: Refactor ExtensionManifestTest to allow usage in src/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (manifest-test) add ScopedChannel 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/extension_manifest_test.h" 5 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h"
6 #include "chrome/common/extensions/manifest_url_handler.h" 6 #include "chrome/common/extensions/manifest_url_handler.h"
7 #include "extensions/common/manifest_constants.h" 7 #include "extensions/common/manifest_constants.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace errors = extensions::manifest_errors; 10 namespace errors = extensions::manifest_errors;
11 11
12 class AboutPageManifestTest : public ExtensionManifestTest {}; 12 class AboutPageManifestTest : public ChromeManifestTest {};
13 13
14 TEST_F(AboutPageManifestTest, AboutPageInSharedModules) { 14 TEST_F(AboutPageManifestTest, AboutPageInSharedModules) {
15 scoped_refptr<extensions::Extension> extension; 15 scoped_refptr<extensions::Extension> extension;
16 extension = LoadAndExpectSuccess("shared_module_about.json"); 16 extension = LoadAndExpectSuccess("shared_module_about.json");
17 EXPECT_EQ(GURL("chrome-extension://" + extension->id() + "/about.html"), 17 EXPECT_EQ(GURL("chrome-extension://" + extension->id() + "/about.html"),
18 extensions::ManifestURL::GetAboutPage(extension.get())); 18 extensions::ManifestURL::GetAboutPage(extension.get()));
19 19
20 Testcase testcases[] = { 20 Testcase testcases[] = {
21 // Forbid data types other than strings. 21 // Forbid data types other than strings.
22 Testcase("shared_module_about_invalid_type.json", 22 Testcase("shared_module_about_invalid_type.json",
23 errors::kInvalidAboutPage), 23 errors::kInvalidAboutPage),
24 24
25 // Forbid absolute URLs. 25 // Forbid absolute URLs.
26 Testcase("shared_module_about_absolute.json", 26 Testcase("shared_module_about_absolute.json",
27 errors::kInvalidAboutPageExpectRelativePath)}; 27 errors::kInvalidAboutPageExpectRelativePath)};
28 RunTestcases(testcases, arraysize(testcases), EXPECT_TYPE_ERROR); 28 RunTestcases(testcases, arraysize(testcases), EXPECT_TYPE_ERROR);
29 } 29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698