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

Unified Diff: chrome/browser/ui/webui/settings_browsertest.cc

Issue 6805003: Add a test for checking that refreshing a page does load the same WebUI page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 | chrome/test/data/webui/settings.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings_browsertest.cc
===================================================================
--- chrome/browser/ui/webui/settings_browsertest.cc (revision 82016)
+++ chrome/browser/ui/webui/settings_browsertest.cc (working copy)
@@ -89,14 +89,22 @@
#define MAYBE_TestSetBooleanPrefTriggers TestSetBooleanPrefTriggers
#endif
IN_PROC_BROWSER_TEST_F(SettingsWebUITest, MAYBE_TestSetBooleanPrefTriggers) {
+ ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUISettingsURL));
// This serves as an example of a very constrained test.
ListValue true_list_value;
true_list_value.Append(Value::CreateStringValue("browser.show_home_button"));
true_list_value.Append(Value::CreateBooleanValue(true));
true_list_value.Append(
Value::CreateStringValue("Options_Homepage_HomeButton"));
- ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUISettingsURL));
+
EXPECT_CALL(mock_core_options_handler_,
HandleSetBooleanPref(Eq_ListValue(&true_list_value)));
ASSERT_TRUE(RunJavascriptTest("testSetBooleanPrefTriggers"));
}
+
+IN_PROC_BROWSER_TEST_F(SettingsWebUITest, testRefreshStaysOnCurrentPage) {
+ ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUISettingsURL));
+ ASSERT_TRUE(RunJavascriptFunction("openUnderTheHood"));
+ ASSERT_TRUE(RunJavascriptFunction("refreshPage"));
+ ASSERT_TRUE(RunJavascriptTest("testPageIsUnderTheHood"));
+}
« no previous file with comments | « no previous file | chrome/test/data/webui/settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698