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

Unified Diff: chrome/browser/extensions/api/socket/socket_api.cc

Issue 10795052: Improve unit testing of socket API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tricky IO thread issues in a way that doesn't kill 50 other tests. Created 8 years, 5 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 | chrome/browser/extensions/api/socket/socket_api_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/socket/socket_api.cc
diff --git a/chrome/browser/extensions/api/socket/socket_api.cc b/chrome/browser/extensions/api/socket/socket_api.cc
index 765035c42d49bcef6953f23f21dc14cce7f0f616..33581fa70208a7d43e7e2d4b92eb391c935bb471 100644
--- a/chrome/browser/extensions/api/socket/socket_api.cc
+++ b/chrome/browser/extensions/api/socket/socket_api.cc
@@ -42,6 +42,10 @@ SocketAsyncApiFunction::~SocketAsyncApiFunction() {
bool SocketAsyncApiFunction::PrePrepare() {
manager_ = ExtensionSystem::Get(profile())->socket_manager();
+ DCHECK(manager_) << "There is no socket manager. "
+ "If this assertion is failing during a test, then it is likely that "
+ "TestExtensionSystem is failing to provide an instance of "
+ "ApiResourceManager<Socket>.";
return manager_ != NULL;
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/socket/socket_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698