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

Unified Diff: content/browser/browser_plugin/browser_plugin_host_browsertest.cc

Issue 11092023: Browser Plugin: Implement CanGoBack/CanGoForward (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed creis@'s comments Created 8 years, 2 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 | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/common/browser_plugin_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_host_browsertest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
index 703a4f9e894ce006e34f8cb50df369202d02aa0e..4f19031bd257bc3f4d7913ec9b181737d401f87d 100644
--- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
+++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
@@ -550,6 +550,19 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, Renavigate) {
string16 actual_title = title_watcher.WaitAndGetTitle();
EXPECT_EQ(expected_title, actual_title);
+
+ base::Value* value =
+ rvh->ExecuteJavascriptAndGetValue(string16(),
+ ASCIIToUTF16("CanGoBack()"));
+ bool result = false;
+ ASSERT_TRUE(value->GetAsBoolean(&result));
+ EXPECT_TRUE(result);
+
+ value = rvh->ExecuteJavascriptAndGetValue(string16(),
+ ASCIIToUTF16("CanGoForward()"));
+ result = false;
+ ASSERT_TRUE(value->GetAsBoolean(&result));
+ EXPECT_TRUE(result);
}
// Go forward and verify that we're back at P3.
@@ -562,6 +575,13 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, Renavigate) {
string16 actual_title = title_watcher.WaitAndGetTitle();
EXPECT_EQ(expected_title, actual_title);
+
+ base::Value* value =
+ rvh->ExecuteJavascriptAndGetValue(string16(),
+ ASCIIToUTF16("CanGoForward()"));
+ bool result = true;
+ ASSERT_TRUE(value->GetAsBoolean(&result));
+ EXPECT_FALSE(result);
}
// Go back two entries and verify that we're back at P1.
@@ -574,6 +594,13 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, Renavigate) {
string16 actual_title = title_watcher.WaitAndGetTitle();
EXPECT_EQ(expected_title, actual_title);
+
+ base::Value* value =
+ rvh->ExecuteJavascriptAndGetValue(string16(),
+ ASCIIToUTF16("CanGoBack()"));
+ bool result = true;
+ ASSERT_TRUE(value->GetAsBoolean(&result));
+ EXPECT_FALSE(result);
}
}
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/common/browser_plugin_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698