summaryrefslogtreecommitdiffstats
path: root/remoting/host/capturer_mac_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/capturer_mac_unittest.cc')
-rw-r--r--remoting/host/capturer_mac_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/remoting/host/capturer_mac_unittest.cc b/remoting/host/capturer_mac_unittest.cc
index ca277c5..e28b841 100644
--- a/remoting/host/capturer_mac_unittest.cc
+++ b/remoting/host/capturer_mac_unittest.cc
@@ -77,8 +77,10 @@ void CapturerCallback2::CaptureDoneCallback(
EXPECT_TRUE(planes.data[0] != NULL);
EXPECT_TRUE(planes.data[1] == NULL);
EXPECT_TRUE(planes.data[2] == NULL);
+ // Depending on the capture method, the screen may be flipped or not, so
+ // the stride may be positive or negative.
EXPECT_EQ(static_cast<int>(sizeof(uint32_t) * width),
- planes.strides[0]);
+ abs(planes.strides[0]));
EXPECT_EQ(0, planes.strides[1]);
EXPECT_EQ(0, planes.strides[2]);
}