Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1408)

Unified Diff: content/browser/iframe_zoom_browsertest.cc

Issue 2100233002: Also use EXPECT_NEAR in AllFramesGetDefaultZoom and SubframeRetainsZoomOnNavigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change SubframeRetainsZoomOnNavigation as well. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/iframe_zoom_browsertest.cc
diff --git a/content/browser/iframe_zoom_browsertest.cc b/content/browser/iframe_zoom_browsertest.cc
index f851cf42796ded52e94e4a078a97cb7c0d513556..b74135ca51bf11d8aa6bc1ee09f223bbf479e3d1 100644
--- a/content/browser/iframe_zoom_browsertest.cc
+++ b/content/browser/iframe_zoom_browsertest.cc
@@ -316,9 +316,13 @@ IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest, AllFramesGetDefaultZoom) {
WaitAndCheckFrameZoom(msg_queue, frame_observers);
}
- EXPECT_DOUBLE_EQ(
+ // Make this comparison approximate for Nexus5X test;
+ // https://crbug.com/622858.
+ EXPECT_NEAR(
new_default_zoom_factor,
- GetMainFrameZoomFactor(web_contents(), main_frame_window_border));
+ GetMainFrameZoomFactor(web_contents(), main_frame_window_border),
+ 0.01
+ );
}
IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest, SiblingFramesZoom) {
@@ -415,9 +419,13 @@ IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest, SubframeRetainsZoomOnNavigation) {
WaitAndCheckFrameZoom(msg_queue, frame_observers);
}
- EXPECT_DOUBLE_EQ(
+ // Make this comparison approximate for Nexus5X test;
+ // https://crbug.com/622858.
+ EXPECT_NEAR(
new_zoom_factor,
- GetMainFrameZoomFactor(web_contents(), main_frame_window_border));
+ GetMainFrameZoomFactor(web_contents(), main_frame_window_border),
+ 0.01
+ );
// Navigate child frame cross site, and make sure zoom is the same.
TestNavigationObserver observer(web_contents());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698