Enable device_orientation_event_pump_unittest on Windows platform.

Fix failing tests on windows platform.

BUG=344379

Review URL: https://codereview.chromium.org/199743008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287574 0039d316-1c4b-4281-b951-d872f2087c98
parent fb0f20c1
...@@ -73,12 +73,15 @@ class DeviceOrientationEventPumpTest : public testing::Test { ...@@ -73,12 +73,15 @@ class DeviceOrientationEventPumpTest : public testing::Test {
protected: protected:
virtual void SetUp() OVERRIDE { virtual void SetUp() OVERRIDE {
const DeviceOrientationHardwareBuffer* null_buffer = NULL;
listener_.reset(new MockDeviceOrientationListener); listener_.reset(new MockDeviceOrientationListener);
orientation_pump_.reset(new DeviceOrientationEventPumpForTesting); orientation_pump_.reset(new DeviceOrientationEventPumpForTesting);
buffer_ = static_cast<DeviceOrientationHardwareBuffer*>( buffer_ = static_cast<DeviceOrientationHardwareBuffer*>(
shared_memory_.memory()); shared_memory_.memory());
ASSERT_NE(null_buffer, buffer_);
memset(buffer_, 0, sizeof(DeviceOrientationHardwareBuffer)); memset(buffer_, 0, sizeof(DeviceOrientationHardwareBuffer));
shared_memory_.ShareToProcess(base::kNullProcessHandle, &handle_); ASSERT_TRUE(shared_memory_.ShareToProcess(base::GetCurrentProcessHandle(),
&handle_));
} }
void InitBuffer() { void InitBuffer() {
...@@ -114,13 +117,7 @@ class DeviceOrientationEventPumpTest : public testing::Test { ...@@ -114,13 +117,7 @@ class DeviceOrientationEventPumpTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(DeviceOrientationEventPumpTest); DISALLOW_COPY_AND_ASSIGN(DeviceOrientationEventPumpTest);
}; };
// Always failing in the win try bot. See http://crbug.com/256782. TEST_F(DeviceOrientationEventPumpTest, DidStartPolling) {
#if defined(OS_WIN)
#define MAYBE_DidStartPolling DISABLED_DidStartPolling
#else
#define MAYBE_DidStartPolling DidStartPolling
#endif
TEST_F(DeviceOrientationEventPumpTest, MAYBE_DidStartPolling) {
base::MessageLoop loop; base::MessageLoop loop;
InitBuffer(); InitBuffer();
...@@ -140,13 +137,7 @@ TEST_F(DeviceOrientationEventPumpTest, MAYBE_DidStartPolling) { ...@@ -140,13 +137,7 @@ TEST_F(DeviceOrientationEventPumpTest, MAYBE_DidStartPolling) {
EXPECT_TRUE(received_data.hasGamma); EXPECT_TRUE(received_data.hasGamma);
} }
// Always failing in the win try bot. See http://crbug.com/256782. TEST_F(DeviceOrientationEventPumpTest, FireAllNullEvent) {
#if defined(OS_WIN)
#define MAYBE_FireAllNullEvent DISABLED_FireAllNullEvent
#else
#define MAYBE_FireAllNullEvent FireAllNullEvent
#endif
TEST_F(DeviceOrientationEventPumpTest, MAYBE_FireAllNullEvent) {
base::MessageLoop loop; base::MessageLoop loop;
InitBufferNoData(); InitBufferNoData();
...@@ -163,16 +154,7 @@ TEST_F(DeviceOrientationEventPumpTest, MAYBE_FireAllNullEvent) { ...@@ -163,16 +154,7 @@ TEST_F(DeviceOrientationEventPumpTest, MAYBE_FireAllNullEvent) {
EXPECT_FALSE(received_data.hasGamma); EXPECT_FALSE(received_data.hasGamma);
} }
// Always failing in the win try bot. See http://crbug.com/256782. TEST_F(DeviceOrientationEventPumpTest, UpdateRespectsOrientationThreshold) {
#if defined(OS_WIN)
#define MAYBE_UpdateRespectsOrientationThreshold \
DISABLED_UpdateRespectsOrientationThreshold
#else
#define MAYBE_UpdateRespectsOrientationThreshold \
UpdateRespectsOrientationThreshold
#endif
TEST_F(DeviceOrientationEventPumpTest,
MAYBE_UpdateRespectsOrientationThreshold) {
base::MessageLoop loop; base::MessageLoop loop;
InitBuffer(); InitBuffer();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment