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

Unified Diff: webkit/appcache/appcache_update_job_unittest.cc

Issue 2501002: Quick fix to avoid crashing in unit tests when HTTPTestServer::CreateServer r... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_update_job_unittest.cc
===================================================================
--- webkit/appcache/appcache_update_job_unittest.cc (revision 48757)
+++ webkit/appcache/appcache_update_job_unittest.cc (working copy)
@@ -373,10 +373,14 @@
// Cleanup function; must be called on the IO Thread.
static void CleanupIOThread() {
- http_server_->Release();
- http_server_ = NULL;
- request_context_->Release();
- request_context_ = NULL;
+ if (http_server_) {
+ http_server_->Release();
+ http_server_ = NULL;
+ }
+ if (request_context_) {
+ request_context_->Release();
+ request_context_ = NULL;
+ }
io_thread_shutdown_event_->Signal();
}
@@ -394,6 +398,10 @@
// when it goes out of scope.
template <class Method>
void RunTestOnIOThread(Method method) {
+ EXPECT_TRUE(http_server_);
+ if (!http_server_)
+ return; // Don't even try to run any of these tests w/o the server.
+
event_.reset(new base::WaitableEvent(false, false));
io_thread_->message_loop()->PostTask(
FROM_HERE, NewRunnableMethod(this, method));
@@ -3038,14 +3046,7 @@
RunTestOnIOThread(&AppCacheUpdateJobTest::ManifestRedirectTest);
}
-#if defined(OS_MACOSX)
-// Crashing on mac webkit bots. http://crbug.com/45664
-#define MAYBE_ManifestWrongMimeType DISABLED_ManifestWrongMimeType
-#else
-#define MAYBE_ManifestWrongMimeType ManifestWrongMimeType
-#endif
-
-TEST_F(AppCacheUpdateJobTest, MAYBE_ManifestWrongMimeType) {
+TEST_F(AppCacheUpdateJobTest, ManifestWrongMimeType) {
RunTestOnIOThread(&AppCacheUpdateJobTest::ManifestWrongMimeTypeTest);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698