OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 session_storage.get()); | 287 session_storage.get()); |
288 | 288 |
289 // If the above operation doesn't cause a crash, the test has succeeded! | 289 // If the above operation doesn't cause a crash, the test has succeeded! |
290 } | 290 } |
291 | 291 |
292 // This is a test for crbug.com/312016. It tries to create two RenderWidgetHosts | 292 // This is a test for crbug.com/312016. It tries to create two RenderWidgetHosts |
293 // with the same process and routing ids, which causes a collision. It is almost | 293 // with the same process and routing ids, which causes a collision. It is almost |
294 // identical to the AttemptDuplicateRenderViewHost test case. | 294 // identical to the AttemptDuplicateRenderViewHost test case. |
295 IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, | 295 IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, |
296 AttemptDuplicateRenderWidgetHost) { | 296 AttemptDuplicateRenderWidgetHost) { |
| 297 #if defined(OS_WIN) |
| 298 // PlzNavigate |
| 299 // This test is failing in a flaky manner on Android as it appears to be |
| 300 // leaking URLRequests. See crbug.com/702584. |
| 301 if (IsBrowserSideNavigationEnabled()) |
| 302 return; |
| 303 #endif |
297 int duplicate_routing_id = MSG_ROUTING_NONE; | 304 int duplicate_routing_id = MSG_ROUTING_NONE; |
298 RenderViewHostImpl* pending_rvh = | 305 RenderViewHostImpl* pending_rvh = |
299 PrepareToDuplicateHosts(shell(), &duplicate_routing_id); | 306 PrepareToDuplicateHosts(shell(), &duplicate_routing_id); |
300 EXPECT_NE(MSG_ROUTING_NONE, duplicate_routing_id); | 307 EXPECT_NE(MSG_ROUTING_NONE, duplicate_routing_id); |
301 | 308 |
302 // Since this test executes on the UI thread and hopping threads might cause | 309 // Since this test executes on the UI thread and hopping threads might cause |
303 // different timing in the test, let's simulate a CreateNewWidget call coming | 310 // different timing in the test, let's simulate a CreateNewWidget call coming |
304 // from the IO thread. Use the existing window routing id to cause a | 311 // from the IO thread. Use the existing window routing id to cause a |
305 // deliberate collision. | 312 // deliberate collision. |
306 pending_rvh->CreateNewWidget(duplicate_routing_id, blink::WebPopupTypePage); | 313 pending_rvh->CreateNewWidget(duplicate_routing_id, blink::WebPopupTypePage); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 // separate task of the message loop, so ensure that the process is still | 567 // separate task of the message loop, so ensure that the process is still |
561 // considered alive. | 568 // considered alive. |
562 EXPECT_TRUE(root->current_frame_host()->GetProcess()->HasConnection()); | 569 EXPECT_TRUE(root->current_frame_host()->GetProcess()->HasConnection()); |
563 | 570 |
564 exit_observer.Wait(); | 571 exit_observer.Wait(); |
565 EXPECT_FALSE(exit_observer.did_exit_normally()); | 572 EXPECT_FALSE(exit_observer.did_exit_normally()); |
566 ResourceDispatcherHost::Get()->SetDelegate(nullptr); | 573 ResourceDispatcherHost::Get()->SetDelegate(nullptr); |
567 } | 574 } |
568 | 575 |
569 } // namespace content | 576 } // namespace content |
OLD | NEW |