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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context_unittest.cc

Issue 409743003: Use content::RunBlockingPoolTask() in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 3 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
Index: chrome/browser/geolocation/geolocation_permission_context_unittest.cc
diff --git a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
index 9ae3a305414dee56dd96abfacef9508e28c93f37..ee63eca462e1d2279bb5b3e4d59d6a47ee39e567 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
@@ -10,8 +10,8 @@
#include "base/bind.h"
#include "base/containers/hash_tables.h"
+#include "base/id_map.h"
#include "base/memory/scoped_vector.h"
-#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/simple_test_clock.h"
#include "base/time/clock.h"
@@ -32,6 +32,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_renderer_host.h"
+#include "content/public/test/test_utils.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -179,8 +180,7 @@ void GeolocationPermissionContextTests::RequestGeolocationPermission(
base::Bind(&GeolocationPermissionContextTests::PermissionResponse,
base::Unretained(this), id),
cancel_callback);
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
}
void GeolocationPermissionContextTests::PermissionResponse(

Powered by Google App Engine
This is Rietveld 408576698