Index: mojo/common/handle_watcher_unittest.cc |
diff --git a/mojo/common/handle_watcher_unittest.cc b/mojo/common/handle_watcher_unittest.cc |
index 3eace0cabd0124d92b1143ee1d8c001c9e53e7eb..f4cfd713c56eee977ba2bc353da0404920ef774d 100644 |
--- a/mojo/common/handle_watcher_unittest.cc |
+++ b/mojo/common/handle_watcher_unittest.cc |
@@ -11,6 +11,7 @@ |
#include "base/run_loop.h" |
#include "base/test/simple_test_tick_clock.h" |
#include "mojo/common/time_helper.h" |
+#include "mojo/public/cpp/environment/environment.h" |
#include "mojo/public/cpp/system/core.h" |
#include "mojo/public/tests/test_utils.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -100,6 +101,14 @@ class HandleWatcherTest : public testing::Test { |
test::SetTickClockForTest(NULL); |
} |
+ virtual void SetUp() OVERRIDE { |
+ environment_.reset(new Environment); |
+ } |
+ |
+ virtual void TearDown() OVERRIDE { |
+ environment_.reset(); |
+ } |
+ |
protected: |
void InstallTickClock() { |
test::SetTickClockForTest(&tick_clock_); |
@@ -109,6 +118,7 @@ class HandleWatcherTest : public testing::Test { |
private: |
base::MessageLoop message_loop_; |
+ scoped_ptr<Environment> environment_; |
DISALLOW_COPY_AND_ASSIGN(HandleWatcherTest); |
}; |