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

Unified Diff: chrome/browser/extensions/page_action_controller_unittest.cc

Issue 10827204: Test within-page navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/page_action_controller_unittest.cc
diff --git a/chrome/browser/extensions/page_action_controller_unittest.cc b/chrome/browser/extensions/page_action_controller_unittest.cc
index 924f93fb7224fe63cdc1c8db8278237f5ca774e5..bcb16c577aac3b680262dcbe623bd338caf4086a 100644
--- a/chrome/browser/extensions/page_action_controller_unittest.cc
+++ b/chrome/browser/extensions/page_action_controller_unittest.cc
@@ -78,6 +78,13 @@ TEST_F(PageActionControllerTest, NavigationClearsState) {
EXPECT_EQ(extension->GetResourceURL("popup.html"),
extension->page_action()->GetPopupUrl(tab_id()));
+ // Within-page navigation should keep the settings.
+ NavigateAndCommit(GURL("http://www.google.com/#hash"));
+
+ EXPECT_EQ("Goodbye", extension->page_action()->GetTitle(tab_id()));
+ EXPECT_EQ(extension->GetResourceURL("popup.html"),
+ extension->page_action()->GetPopupUrl(tab_id()));
+
// Should discard the settings, and go back to the defaults.
NavigateAndCommit(GURL("http://www.yahoo.com"));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698