| Index: content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| diff --git a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| index e0c456324c511314f5a5f74dec6e55bce4939c5c..95a54df07f9efaba0d577b27b3079763023e6475 100644
|
| --- a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| +++ b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| @@ -73,12 +73,15 @@ class DeviceOrientationEventPumpTest : public testing::Test {
|
|
|
| protected:
|
| virtual void SetUp() OVERRIDE {
|
| + const DeviceOrientationHardwareBuffer* null_buffer = NULL;
|
| listener_.reset(new MockDeviceOrientationListener);
|
| orientation_pump_.reset(new DeviceOrientationEventPumpForTesting);
|
| buffer_ = static_cast<DeviceOrientationHardwareBuffer*>(
|
| shared_memory_.memory());
|
| + ASSERT_NE(null_buffer, buffer_);
|
| memset(buffer_, 0, sizeof(DeviceOrientationHardwareBuffer));
|
| - shared_memory_.ShareToProcess(base::kNullProcessHandle, &handle_);
|
| + ASSERT_TRUE(shared_memory_.ShareToProcess(base::GetCurrentProcessHandle(),
|
| + &handle_));
|
| }
|
|
|
| void InitBuffer() {
|
| @@ -114,13 +117,7 @@ class DeviceOrientationEventPumpTest : public testing::Test {
|
| DISALLOW_COPY_AND_ASSIGN(DeviceOrientationEventPumpTest);
|
| };
|
|
|
| -// Always failing in the win try bot. See http://crbug.com/256782.
|
| -#if defined(OS_WIN)
|
| -#define MAYBE_DidStartPolling DISABLED_DidStartPolling
|
| -#else
|
| -#define MAYBE_DidStartPolling DidStartPolling
|
| -#endif
|
| -TEST_F(DeviceOrientationEventPumpTest, MAYBE_DidStartPolling) {
|
| +TEST_F(DeviceOrientationEventPumpTest, DidStartPolling) {
|
| base::MessageLoop loop;
|
|
|
| InitBuffer();
|
| @@ -140,13 +137,7 @@ TEST_F(DeviceOrientationEventPumpTest, MAYBE_DidStartPolling) {
|
| EXPECT_TRUE(received_data.hasGamma);
|
| }
|
|
|
| -// Always failing in the win try bot. See http://crbug.com/256782.
|
| -#if defined(OS_WIN)
|
| -#define MAYBE_FireAllNullEvent DISABLED_FireAllNullEvent
|
| -#else
|
| -#define MAYBE_FireAllNullEvent FireAllNullEvent
|
| -#endif
|
| -TEST_F(DeviceOrientationEventPumpTest, MAYBE_FireAllNullEvent) {
|
| +TEST_F(DeviceOrientationEventPumpTest, FireAllNullEvent) {
|
| base::MessageLoop loop;
|
|
|
| InitBufferNoData();
|
| @@ -163,16 +154,7 @@ TEST_F(DeviceOrientationEventPumpTest, MAYBE_FireAllNullEvent) {
|
| EXPECT_FALSE(received_data.hasGamma);
|
| }
|
|
|
| -// Always failing in the win try bot. See http://crbug.com/256782.
|
| -#if defined(OS_WIN)
|
| -#define MAYBE_UpdateRespectsOrientationThreshold \
|
| - DISABLED_UpdateRespectsOrientationThreshold
|
| -#else
|
| -#define MAYBE_UpdateRespectsOrientationThreshold \
|
| - UpdateRespectsOrientationThreshold
|
| -#endif
|
| -TEST_F(DeviceOrientationEventPumpTest,
|
| - MAYBE_UpdateRespectsOrientationThreshold) {
|
| +TEST_F(DeviceOrientationEventPumpTest, UpdateRespectsOrientationThreshold) {
|
| base::MessageLoop loop;
|
|
|
| InitBuffer();
|
|
|