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

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: 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
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 28ab5b1fa0f31994a83b17081990ecaad16f0529..6f14aacf7872d51db6de46f740a2173340d544cb 100644
--- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
+++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
@@ -539,6 +539,12 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, Renavigate) {
content::TitleWatcher title_watcher(test_guest()->web_contents(),
expected_title);
+ base::Value* value =
+ rvh->ExecuteJavascriptAndGetValue(string16(),
+ ASCIIToUTF16("CanGoBack()"));
+ bool result = false;
+ ASSERT_TRUE(value->GetAsBoolean(&result));
+ EXPECT_TRUE(result);
Charlie Reis 2012/10/10 06:06:53 I think it would be clearer to move this check aft
Fady Samuel 2012/10/10 17:36:44 Done.
rvh->ExecuteJavascriptAndGetValue(string16(), ASCIIToUTF16("Back();"));
string16 actual_title = title_watcher.WaitAndGetTitle();
@@ -551,6 +557,12 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, Renavigate) {
content::TitleWatcher title_watcher(test_guest()->web_contents(),
expected_title);
+ base::Value* value =
+ rvh->ExecuteJavascriptAndGetValue(string16(),
+ ASCIIToUTF16("CanGoForward()"));
+ bool result = false;
+ ASSERT_TRUE(value->GetAsBoolean(&result));
+ EXPECT_TRUE(result);
rvh->ExecuteJavascriptAndGetValue(string16(), ASCIIToUTF16("Forward();"));
string16 actual_title = title_watcher.WaitAndGetTitle();
@@ -563,6 +575,12 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, Renavigate) {
content::TitleWatcher title_watcher(test_guest()->web_contents(),
expected_title);
+ base::Value* value =
+ rvh->ExecuteJavascriptAndGetValue(string16(),
+ ASCIIToUTF16("CanGoBack()"));
+ bool result = false;
+ ASSERT_TRUE(value->GetAsBoolean(&result));
+ EXPECT_TRUE(result);
Charlie Reis 2012/10/10 06:06:53 Again, we should be testing cases when CanGoBack r
Fady Samuel 2012/10/10 17:36:44 Done.
rvh->ExecuteJavascriptAndGetValue(string16(), ASCIIToUTF16("Go(-2);"));
string16 actual_title = title_watcher.WaitAndGetTitle();

Powered by Google App Engine
This is Rietveld 408576698