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

Unified Diff: chrome/browser/policy/policy_prefs_browsertest.cc

Issue 11728003: Change ExecuteJavaScript* helper functions in browser_test_utils.{h,cc} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding files for gpu_tests and NaCl browser tests. Created 7 years, 12 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 | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/popup_blocker_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_prefs_browsertest.cc
diff --git a/chrome/browser/policy/policy_prefs_browsertest.cc b/chrome/browser/policy/policy_prefs_browsertest.cc
index b004e5156a24d6b681cdf62917946f14ae048ab5..60e31050d7b674a7e5589f63fc0ff703dac1bcb8 100644
--- a/chrome/browser/policy/policy_prefs_browsertest.cc
+++ b/chrome/browser/policy/policy_prefs_browsertest.cc
@@ -81,8 +81,8 @@ class PrefMapping {
const std::string& indicator_selector)
: pref_(pref),
is_local_state_(is_local_state),
+ indicator_test_setup_js_(indicator_test_setup_js),
indicator_selector_(indicator_selector) {
- indicator_test_setup_js_ = ASCIIToWide(indicator_test_setup_js);
}
~PrefMapping() {}
@@ -90,7 +90,7 @@ class PrefMapping {
bool is_local_state() const { return is_local_state_; }
- const std::wstring& indicator_test_setup_js() const {
+ const std::string& indicator_test_setup_js() const {
return indicator_test_setup_js_;
}
@@ -108,7 +108,7 @@ class PrefMapping {
private:
std::string pref_;
bool is_local_state_;
- std::wstring indicator_test_setup_js_;
+ std::string indicator_test_setup_js_;
std::string indicator_selector_;
ScopedVector<IndicatorTestCase> indicator_test_cases_;
@@ -311,7 +311,7 @@ void VerifyControlledSettingIndicators(Browser* browser,
const std::string& value,
const std::string& controlled_by,
bool readonly) {
- std::wstringstream javascript;
+ std::stringstream javascript;
javascript << "var nodes = document.querySelectorAll("
<< " 'span.controlled-setting-indicator"
<< selector.c_str() << "');"
@@ -332,7 +332,7 @@ void VerifyControlledSettingIndicators(Browser* browser,
// Retrieve the state of all controlled setting indicators matching the
// |selector| as JSON.
ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
- contents->GetRenderViewHost(), L"", javascript.str(), &json));
+ contents->GetRenderViewHost(), "", javascript.str(), &json));
scoped_ptr<base::Value> value_ptr(base::JSONReader::Read(json));
const base::ListValue* indicators = NULL;
ASSERT_TRUE(value_ptr.get());
@@ -492,7 +492,8 @@ IN_PROC_BROWSER_TEST_P(PolicyPrefsTest, CheckPolicyIndicators) {
ui_test_utils::NavigateToURL(browser(), GURL(kMainSettingsPage));
if (!(*pref_mapping)->indicator_test_setup_js().empty()) {
ASSERT_TRUE(content::ExecuteJavaScript(
- chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"",
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
+ "",
(*pref_mapping)->indicator_test_setup_js()));
}
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/popup_blocker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698