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

Side by Side Diff: content/browser/site_per_process_browsertest.cc

Issue 2826323003: Re-enable OOPIF scroll bubbling test, limit to non-animated scroll. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/site_per_process_browsertest.h" 5 #include "content/browser/site_per_process_browsertest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 1077
1078 // The precise amount of scroll for the first view position update is not 1078 // The precise amount of scroll for the first view position update is not
1079 // deterministic, so this simply verifies that the OOPIF moved from its 1079 // deterministic, so this simply verifies that the OOPIF moved from its
1080 // earlier position. 1080 // earlier position.
1081 gfx::Rect update_rect = filter->last_rect(); 1081 gfx::Rect update_rect = filter->last_rect();
1082 EXPECT_LT(update_rect.y(), bounds.y() - rwhv_root->GetViewBounds().y()); 1082 EXPECT_LT(update_rect.y(), bounds.y() - rwhv_root->GetViewBounds().y());
1083 } 1083 }
1084 1084
1085 // Test that scrolling a nested out-of-process iframe bubbles unused scroll 1085 // Test that scrolling a nested out-of-process iframe bubbles unused scroll
1086 // delta to a parent frame. 1086 // delta to a parent frame.
1087 // Flaky: https://crbug.com/627238 1087 #if defined(OS_ANDROID) || defined(OS_CHROMEOS)
1088 #define MAYBE_ScrollBubblingFromOOPIFTest DISABLED_ScrollBubblingFromOOPIFTest
1089 #else
1090 #define MAYBE_ScrollBubblingFromOOPIFTest ScrollBubblingFromOOPIFTest
1091 #endif
1088 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, 1092 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
1089 DISABLED_ScrollBubblingFromOOPIFTest) { 1093 MAYBE_ScrollBubblingFromOOPIFTest) {
1090 GURL main_url(embedded_test_server()->GetURL( 1094 GURL main_url(embedded_test_server()->GetURL(
1091 "a.com", "/cross_site_iframe_factory.html?a(b)")); 1095 "a.com", "/cross_site_iframe_factory.html?a(b)"));
1092 EXPECT_TRUE(NavigateToURL(shell(), main_url)); 1096 EXPECT_TRUE(NavigateToURL(shell(), main_url));
1093 1097
1094 // It is safe to obtain the root frame tree node here, as it doesn't change. 1098 // It is safe to obtain the root frame tree node here, as it doesn't change.
1095 FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) 1099 FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents())
1096 ->GetFrameTree() 1100 ->GetFrameTree()
1097 ->root(); 1101 ->root();
1098 ASSERT_EQ(1U, root->child_count()); 1102 ASSERT_EQ(1U, root->child_count());
1099 1103
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 int initial_y = update_rect.y(); 1151 int initial_y = update_rect.y();
1148 filter->Reset(); 1152 filter->Reset();
1149 1153
1150 // Scroll the parent frame downward. 1154 // Scroll the parent frame downward.
1151 blink::WebMouseWheelEvent scroll_event( 1155 blink::WebMouseWheelEvent scroll_event(
1152 blink::WebInputEvent::kMouseWheel, blink::WebInputEvent::kNoModifiers, 1156 blink::WebInputEvent::kMouseWheel, blink::WebInputEvent::kNoModifiers,
1153 blink::WebInputEvent::kTimeStampForTesting); 1157 blink::WebInputEvent::kTimeStampForTesting);
1154 scroll_event.SetPositionInWidget(1, 1); 1158 scroll_event.SetPositionInWidget(1, 1);
1155 scroll_event.delta_x = 0.0f; 1159 scroll_event.delta_x = 0.0f;
1156 scroll_event.delta_y = -5.0f; 1160 scroll_event.delta_y = -5.0f;
1161 // Set has_precise_scroll_deltas to keep these events off the animated scroll
1162 // pathways, which currently break this test.
1163 // https://bugs.chromium.org/p/chromium/issues/detail?id=710513
1164 scroll_event.has_precise_scrolling_deltas = true;
1157 rwhv_parent->ProcessMouseWheelEvent(scroll_event, ui::LatencyInfo()); 1165 rwhv_parent->ProcessMouseWheelEvent(scroll_event, ui::LatencyInfo());
1158 1166
1159 // Ensure that the view position is propagated to the child properly. 1167 // Ensure that the view position is propagated to the child properly.
1160 filter->Wait(); 1168 filter->Wait();
1161 update_rect = filter->last_rect(); 1169 update_rect = filter->last_rect();
1162 EXPECT_LT(update_rect.y(), initial_y); 1170 EXPECT_LT(update_rect.y(), initial_y);
1163 filter->Reset(); 1171 filter->Reset();
1164 1172
1165 // Now scroll the nested frame upward, which should bubble to the parent. 1173 // Now scroll the nested frame upward, which should bubble to the parent.
1166 // The upscroll exceeds the amount that the frame was initially scrolled 1174 // The upscroll exceeds the amount that the frame was initially scrolled
(...skipping 8766 matching lines...) Expand 10 before | Expand all | Expand 10 after
9933 names.insert(root->children[0]->frame_entry->frame_unique_name()); 9941 names.insert(root->children[0]->frame_entry->frame_unique_name());
9934 } 9942 }
9935 9943
9936 // More than one entry in the set means that the subframe frame navigation 9944 // More than one entry in the set means that the subframe frame navigation
9937 // entries didn't have a consistent unique name. This will break history 9945 // entries didn't have a consistent unique name. This will break history
9938 // navigations =( 9946 // navigations =(
9939 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; 9947 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!";
9940 } 9948 }
9941 9949
9942 } // namespace content 9950 } // namespace content
OLDNEW
« 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