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

Unified Diff: chrome/browser/component_updater/test/component_updater_service_unittest.cc

Issue 10959020: SystemMonitor refactoring: move power state monitor into a separate class called PowerMonitor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add power notifier Created 8 years, 2 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/component_updater/test/component_updater_service_unittest.cc
diff --git a/chrome/browser/component_updater/test/component_updater_service_unittest.cc b/chrome/browser/component_updater/test/component_updater_service_unittest.cc
index 6a25757cdfa4f84088d7d6a518c55bfb9e007a39..9df7ddbbb1f0da1335261bbe743fd149f3f4fd87 100644
--- a/chrome/browser/component_updater/test/component_updater_service_unittest.cc
+++ b/chrome/browser/component_updater/test/component_updater_service_unittest.cc
@@ -24,6 +24,10 @@
#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_MACOSX)
+#include "base/power_monitor/power_monitor.h"
+#endif
+
using content::BrowserThread;
using content::TestNotificationTracker;
@@ -139,6 +143,10 @@ class ComponentUpdaterTest : public testing::Test {
};
ComponentUpdaterTest() : component_updater_(NULL), test_config_(NULL) {
+#if defined(OS_MACOSX)
+ // Must be called before PowerMonitor's ctor.
+ base::PowerMonitor::AllocateSystemIOPorts();
+#endif
// The component updater instance under test.
test_config_ = new TestConfigurator;
component_updater_.reset(ComponentUpdateServiceFactory(test_config_));

Powered by Google App Engine
This is Rietveld 408576698