diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 15:42:00 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 15:42:00 +0000 |
commit | 7024d3eea1d8328883736f5cd3cbef480aa0e740 (patch) | |
tree | 5fc40e7da24d79306321037359bce7bd97bcf36b /chrome/browser/session_history_uitest.cc | |
parent | e9ff5e31b28b6ee684ceaf47afe4f483163f6d1d (diff) | |
download | chromium_src-7024d3eea1d8328883736f5cd3cbef480aa0e740.zip chromium_src-7024d3eea1d8328883736f5cd3cbef480aa0e740.tar.gz chromium_src-7024d3eea1d8328883736f5cd3cbef480aa0e740.tar.bz2 |
Remove wstring from RVH's run Javascript command.
BUG=23581
TEST=no visible changes; all tests pass
Review URL: http://codereview.chromium.org/6312154
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/session_history_uitest.cc')
-rw-r--r-- | chrome/browser/session_history_uitest.cc | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/chrome/browser/session_history_uitest.cc b/chrome/browser/session_history_uitest.cc index b65c90c..abadd32 100644 --- a/chrome/browser/session_history_uitest.cc +++ b/chrome/browser/session_history_uitest.cc @@ -1,8 +1,9 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/common/url_constants.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/browser_proxy.h" @@ -61,9 +62,9 @@ class SessionHistoryTest : public UITest { } std::wstring GetTabTitle() { - std::wstring title; + string16 title; EXPECT_TRUE(tab_->GetTabTitle(&title)); - return title; + return UTF16ToWideHack(title); } GURL GetTabURL() { @@ -535,23 +536,31 @@ TEST_F(SessionHistoryTest, DISABLED_HistoryLength) { int length; ASSERT_TRUE(tab_->ExecuteAndExtractInt( - L"", L"domAutomationController.send(history.length)", &length)); + string16(), + ASCIIToUTF16("domAutomationController.send(history.length)"), + &length)); EXPECT_EQ(1, length); ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title1.html"))); ASSERT_TRUE(tab_->ExecuteAndExtractInt( - L"", L"domAutomationController.send(history.length)", &length)); + string16(), + ASCIIToUTF16("domAutomationController.send(history.length)"), + &length)); EXPECT_EQ(2, length); // Now test that history.length is updated when the navigation is committed. ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL( "files/session_history/record_length.html"))); ASSERT_TRUE(tab_->ExecuteAndExtractInt( - L"", L"domAutomationController.send(history.length)", &length)); + string16(), + ASCIIToUTF16("domAutomationController.send(history.length)"), + &length)); EXPECT_EQ(3, length); ASSERT_TRUE(tab_->ExecuteAndExtractInt( - L"", L"domAutomationController.send(history_length)", &length)); + string16(), + ASCIIToUTF16("domAutomationController.send(history_length)"), + &length)); EXPECT_EQ(3, length); ASSERT_TRUE(tab_->GoBack()); @@ -560,7 +569,9 @@ TEST_F(SessionHistoryTest, DISABLED_HistoryLength) { // Ensure history.length is properly truncated. ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); ASSERT_TRUE(tab_->ExecuteAndExtractInt( - L"", L"domAutomationController.send(history.length)", &length)); + string16(), + ASCIIToUTF16("domAutomationController.send(history.length)"), + &length)); EXPECT_EQ(2, length); } |