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 {
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();
......
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