Index: chrome/browser/session_history_uitest.cc |
=================================================================== |
--- chrome/browser/session_history_uitest.cc (revision 73855) |
+++ chrome/browser/session_history_uitest.cc (working copy) |
@@ -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 @@ |
} |
std::wstring GetTabTitle() { |
- std::wstring title; |
+ string16 title; |
EXPECT_TRUE(tab_->GetTabTitle(&title)); |
- return title; |
+ return UTF16ToWideHack(title); |
} |
GURL GetTabURL() { |
@@ -535,23 +536,31 @@ |
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 @@ |
// 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); |
} |