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 |