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

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: 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 9848020c1725a3d8682f1b6c0f284d0aaecbbe5c..637d6147dd7d62a2c41f92f719cd693a54b5a66e 100644
--- a/chrome/browser/extensions/api/socket/socket_api.cc
+++ b/chrome/browser/extensions/api/socket/socket_api.cc
@@ -42,6 +42,8 @@ SocketAsyncApiFunction::~SocketAsyncApiFunction() {
bool SocketAsyncApiFunction::PrePrepare() {
manager_ = ExtensionSystem::Get(profile())->socket_manager();
+ DCHECK(manager_) << "There is no socket manager. " <<
+ "It is likely you are testing this API in an isolated environment.";
asargent_no_longer_on_chrome 2012/07/23 16:57:57 nit: I think this second line of error output is p
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