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_)); |