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

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

Issue 2818733002: Re-enable OOPIF scroll bubbling test. (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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 1083
1084 // The precise amount of scroll for the first view position update is not 1084 // The precise amount of scroll for the first view position update is not
1085 // deterministic, so this simply verifies that the OOPIF moved from its 1085 // deterministic, so this simply verifies that the OOPIF moved from its
1086 // earlier position. 1086 // earlier position.
1087 gfx::Rect update_rect = filter->last_rect(); 1087 gfx::Rect update_rect = filter->last_rect();
1088 EXPECT_LT(update_rect.y(), bounds.y() - rwhv_root->GetViewBounds().y()); 1088 EXPECT_LT(update_rect.y(), bounds.y() - rwhv_root->GetViewBounds().y());
1089 } 1089 }
1090 1090
1091 // Test that scrolling a nested out-of-process iframe bubbles unused scroll 1091 // Test that scrolling a nested out-of-process iframe bubbles unused scroll
1092 // delta to a parent frame. 1092 // delta to a parent frame.
1093 // Flaky: https://crbug.com/627238 1093 #if defined(OS_ANDROID)
1094 #define MAYBE_ScrollBubblingFromOOPIFTest DISABLED_ScrollBubblingFromOOPIFTest
1095 #else
1096 #define MAYBE_ScrollBubblingFromOOPIFTest ScrollBubblingFromOOPIFTest
1097 #endif
1094 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, 1098 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
1095 DISABLED_ScrollBubblingFromOOPIFTest) { 1099 MAYBE_ScrollBubblingFromOOPIFTest) {
1096 GURL main_url(embedded_test_server()->GetURL( 1100 GURL main_url(embedded_test_server()->GetURL(
1097 "a.com", "/cross_site_iframe_factory.html?a(b)")); 1101 "a.com", "/cross_site_iframe_factory.html?a(b)"));
1098 EXPECT_TRUE(NavigateToURL(shell(), main_url)); 1102 EXPECT_TRUE(NavigateToURL(shell(), main_url));
1099 1103
1100 // It is safe to obtain the root frame tree node here, as it doesn't change. 1104 // It is safe to obtain the root frame tree node here, as it doesn't change.
1101 FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) 1105 FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents())
1102 ->GetFrameTree() 1106 ->GetFrameTree()
1103 ->root(); 1107 ->root();
1104 ASSERT_EQ(1U, root->child_count()); 1108 ASSERT_EQ(1U, root->child_count());
1105 1109
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 int initial_y = update_rect.y(); 1157 int initial_y = update_rect.y();
1154 filter->Reset(); 1158 filter->Reset();
1155 1159
1156 // Scroll the parent frame downward. 1160 // Scroll the parent frame downward.
1157 blink::WebMouseWheelEvent scroll_event( 1161 blink::WebMouseWheelEvent scroll_event(
1158 blink::WebInputEvent::kMouseWheel, blink::WebInputEvent::kNoModifiers, 1162 blink::WebInputEvent::kMouseWheel, blink::WebInputEvent::kNoModifiers,
1159 blink::WebInputEvent::kTimeStampForTesting); 1163 blink::WebInputEvent::kTimeStampForTesting);
1160 scroll_event.SetPositionInWidget(1, 1); 1164 scroll_event.SetPositionInWidget(1, 1);
1161 scroll_event.delta_x = 0.0f; 1165 scroll_event.delta_x = 0.0f;
1162 scroll_event.delta_y = -5.0f; 1166 scroll_event.delta_y = -5.0f;
1167 // Set has_precise_scroll_deltas to keep these events off the animated scroll
1168 // pathways, which currently break this test.
1169 // https://bugs.chromium.org/p/chromium/issues/detail?id=710513
1170 scroll_event.has_precise_scrolling_deltas = true;
1163 rwhv_parent->ProcessMouseWheelEvent(scroll_event, ui::LatencyInfo()); 1171 rwhv_parent->ProcessMouseWheelEvent(scroll_event, ui::LatencyInfo());
1164 1172
1165 // Ensure that the view position is propagated to the child properly. 1173 // Ensure that the view position is propagated to the child properly.
1166 filter->Wait(); 1174 filter->Wait();
1167 update_rect = filter->last_rect(); 1175 update_rect = filter->last_rect();
1168 EXPECT_LT(update_rect.y(), initial_y); 1176 EXPECT_LT(update_rect.y(), initial_y);
1169 filter->Reset(); 1177 filter->Reset();
1170 1178
1171 // Now scroll the nested frame upward, which should bubble to the parent. 1179 // Now scroll the nested frame upward, which should bubble to the parent.
1172 // The upscroll exceeds the amount that the frame was initially scrolled 1180 // The upscroll exceeds the amount that the frame was initially scrolled
(...skipping 8688 matching lines...) Expand 10 before | Expand all | Expand 10 after
9861 names.insert(root->children[0]->frame_entry->frame_unique_name()); 9869 names.insert(root->children[0]->frame_entry->frame_unique_name());
9862 } 9870 }
9863 9871
9864 // More than one entry in the set means that the subframe frame navigation 9872 // More than one entry in the set means that the subframe frame navigation
9865 // entries didn't have a consistent unique name. This will break history 9873 // entries didn't have a consistent unique name. This will break history
9866 // navigations =( 9874 // navigations =(
9867 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; 9875 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!";
9868 } 9876 }
9869 9877
9870 } // namespace content 9878 } // 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