summaryrefslogtreecommitdiffstats
path: root/webkit/glue/bookmarklet_unittest.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 20:38:18 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 20:38:18 +0000
commit94f957fcf2bd0d102c35ab6c897332c72b74fc4e (patch)
tree23291b650b873a02466f58d3b7e3c04eb62059a7 /webkit/glue/bookmarklet_unittest.cc
parent5e04fb58560009c5555ff7fb9040521863403c74 (diff)
downloadchromium_src-94f957fcf2bd0d102c35ab6c897332c72b74fc4e.zip
chromium_src-94f957fcf2bd0d102c35ab6c897332c72b74fc4e.tar.gz
chromium_src-94f957fcf2bd0d102c35ab6c897332c72b74fc4e.tar.bz2
glue: use string16 in place of wstring for Unicode text
BUG=23581 TEST=compiles Review URL: http://codereview.chromium.org/5591004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/bookmarklet_unittest.cc')
-rw-r--r--webkit/glue/bookmarklet_unittest.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/webkit/glue/bookmarklet_unittest.cc b/webkit/glue/bookmarklet_unittest.cc
index 5d8a364..d7fada5 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