| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |