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

Unified Diff: webkit/glue/mimetype_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 | « webkit/glue/cpp_bound_class_unittest.cc ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/mimetype_unittest.cc
diff --git a/webkit/glue/mimetype_unittest.cc b/webkit/glue/mimetype_unittest.cc
index 1c2e5f4a3d7b6e51da93b987c2179ae707485d85..3f17e79c2cdbb077953e96957d61ef8e73b9009b 100644
--- a/webkit/glue/mimetype_unittest.cc
+++ b/webkit/glue/mimetype_unittest.cc
@@ -23,12 +23,12 @@ class MimeTypeTests : public TestShellTest {
test_shell_->WaitTestFinished();
}
- void CheckMimeType(const char* mimetype, const std::wstring& expected) {
+ void CheckMimeType(const char* mimetype, const std::string& expected) {
std::string path("contenttype?");
GURL url(test_server_.GetURL(path + mimetype));
LoadURL(url);
WebFrame* frame = test_shell_->webView()->mainFrame();
- EXPECT_EQ(expected, webkit_glue::DumpDocumentText(frame));
+ EXPECT_EQ(expected, UTF16ToASCII(webkit_glue::DumpDocumentText(frame)));
}
UnittestTestServer test_server_;
@@ -37,8 +37,8 @@ class MimeTypeTests : public TestShellTest {
TEST_F(MimeTypeTests, MimeTypeTests) {
ASSERT_TRUE(test_server_.Start());
- std::wstring expected_src(L"<html>\n<body>\n"
- L"<p>HTML text</p>\n</body>\n</html>\n");
+ std::string expected_src("<html>\n<body>\n"
+ "<p>HTML text</p>\n</body>\n</html>\n");
// These files should all be displayed as plain text.
const char* plain_text[] = {
@@ -66,7 +66,7 @@ TEST_F(MimeTypeTests, MimeTypeTests) {
"application/xhtml+xml",
};
for (size_t i = 0; i < arraysize(html_src); ++i) {
- CheckMimeType(html_src[i], L"HTML text");
+ CheckMimeType(html_src[i], "HTML text");
}
// These shouldn't be rendered as text or HTML, but shouldn't download
@@ -78,7 +78,7 @@ TEST_F(MimeTypeTests, MimeTypeTests) {
"image/bmp",
};
for (size_t i = 0; i < arraysize(not_text); ++i) {
- CheckMimeType(not_text[i], L"");
+ CheckMimeType(not_text[i], "");
test_shell_->webView()->mainFrame()->stopLoading();
}
« no previous file with comments | « webkit/glue/cpp_bound_class_unittest.cc ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698