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

Unified Diff: webkit/glue/mimetype_unittest.cc

Issue 16490: Add FTP unit test in preparation for portable FTP implementation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 | « net/url_request/url_request_unittest.cc ('k') | webkit/glue/resource_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/mimetype_unittest.cc
===================================================================
--- webkit/glue/mimetype_unittest.cc (revision 7499)
+++ webkit/glue/mimetype_unittest.cc (working copy)
@@ -23,7 +23,7 @@
test_shell_->LoadURL(UTF8ToWide(url.spec()).c_str());
test_shell_->WaitTestFinished();
}
-
+
void CheckMimeType(const char* mimetype, const std::wstring& expected) {
std::string path("contenttype?");
GURL url = server_->TestServerPage(path + mimetype);
@@ -31,16 +31,17 @@
WebFrame* frame = test_shell_->webView()->GetMainFrame();
EXPECT_EQ(expected, webkit_glue::DumpDocumentText(frame));
}
-
- scoped_ptr<UnittestTestServer> server_;
+
+ scoped_refptr<UnittestTestServer> server_;
};
TEST_F(MimeTypeTests, MimeTypeTests) {
- server_.reset(new UnittestTestServer);
+ server_ = UnittestTestServer::CreateServer();
+ ASSERT_TRUE(NULL != server_.get());
std::wstring expected_src(L"<html>\n<body>\n"
L"<p>HTML text</p>\n</body>\n</html>\n");
-
+
// These files should all be displayed as plain text.
const char* plain_text[] = {
"text/css",
@@ -80,7 +81,6 @@
// TODO(tc): make sure other mime types properly go to download (e.g.,
// image/foo).
- server_.reset(NULL);
}
} // namespace
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | webkit/glue/resource_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698