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

Unified Diff: chrome/browser/extensions/extension_override_apitest.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
Index: chrome/browser/extensions/extension_override_apitest.cc
diff --git a/chrome/browser/extensions/extension_override_apitest.cc b/chrome/browser/extensions/extension_override_apitest.cc
index a7a66b7b9cc67c17078fac8c3f8b1d5838a90bf7..7531d34fee1b7f1aa4392881db3df26515406d42 100644
--- a/chrome/browser/extensions/extension_override_apitest.cc
+++ b/chrome/browser/extensions/extension_override_apitest.cc
@@ -3,11 +3,29 @@
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
+#include "chrome/test/ui_test_utils.h"
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Overrides) {
- // The first pass response is the creation of a new tab.
- ASSERT_TRUE(RunExtensionTest("override")) << message_;
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OverrideNewtab) {
+ ASSERT_TRUE(RunExtensionTest("override/newtab")) << message_;
+ {
+ ResultCatcher catcher;
+ // Navigate to the new tab page. The overridden new tab page
+ // will call chrome.test.notifyPass() .
+ ui_test_utils::NavigateToURL(browser(), GURL("chrome://newtab/"));
+ ASSERT_TRUE(catcher.GetNextResult());
+ }
- // TODO(erikkay) load a second override and verify behavior, then unload
- // the first and verify behavior, etc.
+ // TODO(erikkay) Load a second extension with the same override.
+ // Verify behavior, then unload the first and verify behavior, etc.
+}
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OverrideHistory) {
+ ASSERT_TRUE(RunExtensionTest("override/history")) << message_;
+ {
+ ResultCatcher catcher;
+ // Navigate to the history page. The overridden history page
+ // will call chrome.test.notifyPass() .
+ ui_test_utils::NavigateToURL(browser(), GURL("chrome://history/"));
+ ASSERT_TRUE(catcher.GetNextResult());
+ }
}
« no previous file with comments | « chrome/browser/extensions/extension_history_apitest.cc ('k') | chrome/browser/extensions/permissions_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698