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

Unified Diff: content/browser/geolocation/device_data_provider_unittest.cc

Issue 10535157: [WIP] attempt to allow chrome OS to inject its wifi data provider (Closed) Base URL: http://git.chromium.org/chromium/src.git@remove_radio
Patch Set: Created 8 years, 6 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: content/browser/geolocation/device_data_provider_unittest.cc
diff --git a/content/browser/geolocation/device_data_provider_unittest.cc b/content/browser/geolocation/device_data_provider_unittest.cc
deleted file mode 100644
index 640a8fc32c219c3250843cb29a05f0f158777c74..0000000000000000000000000000000000000000
--- a/content/browser/geolocation/device_data_provider_unittest.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/threading/platform_thread.h"
-#include "content/browser/geolocation/device_data_provider.h"
-#include "content/browser/geolocation/wifi_data_provider_common.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-class NullWifiDataListenerInterface
- : public WifiDataProviderCommon::ListenerInterface {
- public:
- // ListenerInterface
- virtual void DeviceDataUpdateAvailable(
- DeviceDataProvider<WifiData>* provider) {}
-};
-
-TEST(GeolocationDeviceDataProviderWifiData, CreateDestroy) {
- // See http://crbug.com/59913 . The main_message_loop is not required to be
- // run for correct behaviour, but we run it in this test to help smoke out
- // any race conditions between processing in the main loop and the setup /
- // tear down of the DeviceDataProvider thread.
- MessageLoopForUI main_message_loop;
- NullWifiDataListenerInterface listener;
- for (int i = 0; i < 10; i++) {
- DeviceDataProvider<WifiData>::Register(&listener);
- for (int j = 0; j < 10; j++) {
- base::PlatformThread::Sleep(base::TimeDelta());
- main_message_loop.RunAllPending(); // See comment above
- }
- DeviceDataProvider<WifiData>::Unregister(&listener);
- for (int j = 0; j < 10; j++) {
- base::PlatformThread::Sleep(base::TimeDelta());
- main_message_loop.RunAllPending(); // See comment above
- }
- }
-}
-
-} // namespace
« no previous file with comments | « content/browser/geolocation/device_data_provider.cc ('k') | content/browser/geolocation/empty_device_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698