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

Unified Diff: chrome/browser/dom_ui/new_tab_ui_uitest.cc

Issue 6312154: Remove wstring from RVH's run Javascript command.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/dom_ui/new_tab_ui_uitest.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui_uitest.cc (revision 73855)
+++ chrome/browser/dom_ui/new_tab_ui_uitest.cc (working copy)
@@ -5,6 +5,7 @@
#include "chrome/test/ui/ui_test.h"
#include "base/test/test_timeouts.h"
+#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/dom_ui/new_tab_ui.h"
#include "chrome/browser/prefs/pref_value_store.h"
@@ -65,7 +66,6 @@
scoped_refptr<TabProxy> tab = window->GetActiveTab();
ASSERT_TRUE(tab.get());
- std::wstring displayed_username;
// The login span should be eventually populated and have the
// correct value.
ASSERT_TRUE(WaitUntilJavaScriptCondition(tab, L"",
@@ -73,13 +73,14 @@
L"document.getElementById('login-username').innerText.length > 0)",
TestTimeouts::action_max_timeout_ms()));
+ string16 displayed_username;
ASSERT_TRUE(tab->ExecuteAndExtractString(
- L"",
- L"window.domAutomationController.send("
- L"document.getElementById('login-username').innerText)",
+ string16(),
+ ASCIIToUTF16("window.domAutomationController.send("
+ "document.getElementById('login-username').innerText)"),
&displayed_username));
- EXPECT_EQ(L"user@gmail.com", displayed_username);
+ EXPECT_EQ(ASCIIToUTF16("user@gmail.com"), displayed_username);
}
// Loads about:hang into two NTP tabs, ensuring we don't crash.
@@ -152,9 +153,10 @@
// Ensure there are some thumbnails loaded in the page.
int thumbnails_count = -1;
- ASSERT_TRUE(tab->ExecuteAndExtractInt(L"",
- L"window.domAutomationController.send("
- L"document.getElementsByClassName('thumbnail-container').length)",
+ ASSERT_TRUE(tab->ExecuteAndExtractInt(
+ string16(),
+ ASCIIToUTF16("window.domAutomationController.send("
+ "document.getElementsByClassName('thumbnail-container').length)"),
&thumbnails_count));
EXPECT_GT(thumbnails_count, 0);
}

Powered by Google App Engine
This is Rietveld 408576698