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

Unified Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 1530002: Move history API out of experimental. Allow extensions to override history page. (Closed)
Patch Set: Rebase for commit. Created 10 years, 9 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
« no previous file with comments | « chrome/common/extensions/extension_constants.cc ('k') | chrome/common/page_transition_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_manifests_unittest.cc
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index d7a5c2b4f79b32ab9f3af8a9f681cf39d3b2aec7..37c4696b2f2538ff53761877c57fa6f7e186b96b 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -160,3 +160,21 @@ TEST_F(ManifestTest, AppLaunchURL) {
EXPECT_EQ(GURL("http://www.google.com/launch.html"),
extension->GetFullLaunchURL());
}
+
+TEST_F(ManifestTest, Override) {
+ LoadAndExpectError("override_newtab_and_history.json",
+ errors::kMultipleOverrides);
+ LoadAndExpectError("override_invalid_page.json",
+ errors::kInvalidChromeURLOverrides);
+
+ scoped_ptr<Extension> extension;
+
+ extension.reset(LoadAndExpectSuccess("override_new_tab.json"));
+ EXPECT_EQ(extension->url().spec() + "newtab.html",
+ extension->GetChromeURLOverrides().find("newtab")->second.spec());
+
+ extension.reset(LoadAndExpectSuccess("override_history.json"));
+ EXPECT_EQ(extension->url().spec() + "history.html",
+ extension->GetChromeURLOverrides().find("history")->second.spec());
+
+}
« no previous file with comments | « chrome/common/extensions/extension_constants.cc ('k') | chrome/common/page_transition_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698