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

Unified Diff: chrome/browser/extensions/options_page_apitest.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
Index: chrome/browser/extensions/options_page_apitest.cc
diff --git a/chrome/browser/extensions/options_page_apitest.cc b/chrome/browser/extensions/options_page_apitest.cc
index 1a69328cb7fa04a72741fe28243fad9a57b50856..a62f03c011c39f7985cd6c4b86bd1bc88ae817f1 100644
--- a/chrome/browser/extensions/options_page_apitest.cc
+++ b/chrome/browser/extensions/options_page_apitest.cc
@@ -16,13 +16,13 @@
using extensions::Extension;
// Used to simulate a click on the first button named 'Options'.
-static const wchar_t* jscript_click_option_button =
- L"(function() { "
- L" var button = document.evaluate(\"//button[text()='Options']\","
- L" document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,"
- L" null).snapshotItem(0);"
- L" button.click();"
- L"})();";
+static const char kScriptClickOptionButton[] =
+ "(function() { "
+ " var button = document.evaluate(\"//button[text()='Options']\","
+ " document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,"
+ " null).snapshotItem(0);"
+ " button.click();"
+ "})();";
// Test that an extension with an options page makes an 'Options' button appear
// on chrome://extensions, and that clicking the button opens a new tab with the
@@ -41,8 +41,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, DISABLED_OptionsPage) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIExtensionsURL));
TabStripModel* tab_strip = browser()->tab_strip_model();
ASSERT_TRUE(content::ExecuteJavaScript(
- tab_strip->GetActiveWebContents()->GetRenderViewHost(), L"",
- jscript_click_option_button));
+ tab_strip->GetActiveWebContents()->GetRenderViewHost(),
+ "",
+ kScriptClickOptionButton));
// If the options page hasn't already come up, wait for it.
if (tab_strip->count() == 1) {
« no previous file with comments | « chrome/browser/extensions/lazy_background_page_apitest.cc ('k') | chrome/browser/extensions/plugin_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698