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

Unified Diff: webkit/glue/bookmarklet_unittest.cc

Issue 5591004: glue: use string16 in place of wstring for Unicode text (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 10 years 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 | « no previous file | webkit/glue/cpp_bound_class_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/bookmarklet_unittest.cc
diff --git a/webkit/glue/bookmarklet_unittest.cc b/webkit/glue/bookmarklet_unittest.cc
index 5d8a36492636982b9573131ce1ff75c9a0b11345..d7fada519c193323395178ddcb999112c6efde30 100644
--- a/webkit/glue/bookmarklet_unittest.cc
+++ b/webkit/glue/bookmarklet_unittest.cc
@@ -26,8 +26,8 @@ TEST_F(BookmarkletTest, Redirect) {
test_shell_->LoadURL(
GURL("javascript:location.href='data:text/plain,SUCCESS'"));
test_shell_->WaitTestFinished();
- std::wstring text = test_shell_->GetDocumentText();
- EXPECT_EQ(L"SUCCESS", text);
+ string16 text = test_shell_->GetDocumentText();
+ EXPECT_EQ("SUCCESS", UTF16ToASCII(text));
}
TEST_F(BookmarkletTest, RedirectVoided) {
@@ -38,12 +38,12 @@ TEST_F(BookmarkletTest, RedirectVoided) {
test_shell_->LoadURL(
GURL("javascript:void(location.href='data:text/plain,SUCCESS')"));
test_shell_->WaitTestFinished();
- std::wstring text = test_shell_->GetDocumentText();
- EXPECT_EQ(L"SUCCESS", text);
+ string16 text = test_shell_->GetDocumentText();
+ EXPECT_EQ("SUCCESS", UTF16ToASCII(text));
}
TEST_F(BookmarkletTest, NonEmptyResult) {
- std::wstring text;
+ string16 text;
// TODO(darin): This test fails in a JSC build. WebCore+JSC does not really
// need to support this usage until WebCore supports javascript: URLs that
@@ -54,13 +54,13 @@ TEST_F(BookmarkletTest, NonEmptyResult) {
test_shell_->LoadURL(L"javascript:false");
MessageLoop::current()->RunAllPending();
text = test_shell_->GetDocumentText();
- EXPECT_EQ(L"false", text);
+ EXPECT_EQ("false", UTF16ToASCII(text));
#endif
test_shell_->LoadURL(GURL("javascript:'hello world'"));
MessageLoop::current()->RunAllPending();
text = test_shell_->GetDocumentText();
- EXPECT_EQ(L"hello world", text);
+ EXPECT_EQ("hello world", UTF16ToASCII(text));
}
TEST_F(BookmarkletTest, DocumentWrite) {
@@ -69,8 +69,8 @@ TEST_F(BookmarkletTest, DocumentWrite) {
"document.write('hello world');"
"document.close()"));
MessageLoop::current()->RunAllPending();
- std::wstring text = test_shell_->GetDocumentText();
- EXPECT_EQ(L"hello world", text);
+ string16 text = test_shell_->GetDocumentText();
+ EXPECT_EQ("hello world", UTF16ToASCII(text));
}
} // namespace
« no previous file with comments | « no previous file | webkit/glue/cpp_bound_class_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698