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

Side by Side Diff: chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc

Issue 2568893002: Prevent drag-and-drop events from firing over cross-site, same-page frames. (Closed)
Patch Set: Fixed typo in comment. Created 4 years 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 | content/browser/web_contents/web_contents_view_aura.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <algorithm> 5 #include <algorithm>
6 #include <initializer_list> 6 #include <initializer_list>
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 EXPECT_EQ( 1132 EXPECT_EQ(
1133 0, state->left_frame_events_counter->GetNumberOfReceivedEvents("drop")); 1133 0, state->left_frame_events_counter->GetNumberOfReceivedEvents("drop"));
1134 1134
1135 // No events should have fired in the right frame, because it is cross-site 1135 // No events should have fired in the right frame, because it is cross-site
1136 // from the source of the drag. This is the essence of this test. 1136 // from the source of the drag. This is the essence of this test.
1137 EXPECT_EQ(0, state->right_frame_events_counter->GetNumberOfReceivedEvents( 1137 EXPECT_EQ(0, state->right_frame_events_counter->GetNumberOfReceivedEvents(
1138 {"dragstart", "dragleave", "dragenter", "dragover", "drop", 1138 {"dragstart", "dragleave", "dragenter", "dragover", "drop",
1139 "dragend"})); 1139 "dragend"}));
1140 } 1140 }
1141 1141
1142 // TODO(paulmeyer): Should test the case of navigation happening in the middle
1143 // of a drag operation, and cross-site drags should be allowed across a
1144 // navigation.
1145
1142 INSTANTIATE_TEST_CASE_P( 1146 INSTANTIATE_TEST_CASE_P(
1143 SameSiteSubframe, DragAndDropBrowserTest, ::testing::Values(false)); 1147 SameSiteSubframe, DragAndDropBrowserTest, ::testing::Values(false));
1144 1148
1145 INSTANTIATE_TEST_CASE_P( 1149 INSTANTIATE_TEST_CASE_P(
1146 CrossSiteSubframe, DragAndDropBrowserTest, ::testing::Values(true)); 1150 CrossSiteSubframe, DragAndDropBrowserTest, ::testing::Values(true));
1147 1151
1148 } // namespace chrome 1152 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698