Index: webrtc/api/peerconnection_unittest.cc |
diff --git a/webrtc/api/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc |
index 6a909b6b1be0fd9a2cf505b14255ef246dbe8f69..50e2c3dc6b3eb08f6c4b3b91fc6fed3b98d0de0a 100644 |
--- a/webrtc/api/peerconnection_unittest.cc |
+++ b/webrtc/api/peerconnection_unittest.cc |
@@ -1301,11 +1301,17 @@ class P2PTestConductor : public testing::Test { |
void VerifyRenderedSize(int width, |
int height, |
webrtc::VideoRotation rotation) { |
- EXPECT_EQ(width, receiving_client()->rendered_width()); |
- EXPECT_EQ(height, receiving_client()->rendered_height()); |
+ double expected_aspect_ratio = static_cast<double>(width) / height; |
+ double receiving_client_rendered_aspect_ratio = |
+ static_cast<double>(receiving_client()->rendered_width()) / |
+ receiving_client()->rendered_height(); |
+ double initializing_client_rendered_aspect_ratio = |
+ static_cast<double>(initializing_client()->rendered_width()) / |
+ initializing_client()->rendered_height(); |
+ EXPECT_EQ(expected_aspect_ratio, receiving_client_rendered_aspect_ratio); |
+ EXPECT_EQ(expected_aspect_ratio, initializing_client_rendered_aspect_ratio); |
+ |
EXPECT_EQ(rotation, receiving_client()->rendered_rotation()); |
- EXPECT_EQ(width, initializing_client()->rendered_width()); |
- EXPECT_EQ(height, initializing_client()->rendered_height()); |
EXPECT_EQ(rotation, initializing_client()->rendered_rotation()); |
// Verify size of the local preview. |