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

Unified Diff: chrome/browser/chromeos/dbus/proxy_resolution_service_provider_unittest.cc

Issue 8764006: chrome: chromeos: dbus: simplify ProxyResolutionServiceProvider unittest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 9 years, 1 month 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: chrome/browser/chromeos/dbus/proxy_resolution_service_provider_unittest.cc
diff --git a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider_unittest.cc b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider_unittest.cc
index bbd2a4d685626d69aa85dab195bb3ac80de60e38..9cbbdf57a9ef32c72cbaf841d3fc0b5ae39d336d 100644
--- a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider_unittest.cc
+++ b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider_unittest.cc
@@ -261,10 +261,9 @@ class ProxyResolutionServiceProviderTest : public testing::Test {
method_call,
base::Bind(&ProxyResolutionServiceProviderTest::OnResponse,
base::Unretained(this)));
- // Wait for a response.
- while (!response_received_) {
+ // Check for a response.
+ if (!response_received_)
message_loop_.Run();
- }
// Return response.
return response_.release();
}
@@ -273,9 +272,8 @@ class ProxyResolutionServiceProviderTest : public testing::Test {
void OnResponse(dbus::Response* response) {
response_.reset(response);
response_received_ = true;
- if (message_loop_.is_running()) {
- message_loop_.Quit();
- }
+ if (message_loop_.is_running())
+ message_loop_.Quit();
}
// Behaves as |mock_object_proxy_|'s ConnectToSignal().
« 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