| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/containers/hash_tables.h" | 6 #include "base/containers/hash_tables.h" |
| 7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 8 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 8 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 9 #include "content/browser/frame_host/navigator.h" | 9 #include "content/browser/frame_host/navigator.h" |
| 10 #include "content/browser/renderer_host/render_view_host_factory.h" | 10 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 11 #include "content/browser/renderer_host/render_view_host_impl.h" | 11 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 12 #include "content/browser/web_contents/web_contents_impl.h" | 12 #include "content/browser/web_contents/web_contents_impl.h" |
| 13 #include "content/common/view_messages.h" | 13 #include "content/common/view_messages.h" |
| 14 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
| 15 #include "content/public/browser/storage_partition.h" | 15 #include "content/public/browser/storage_partition.h" |
| 16 #include "content/public/common/content_switches.h" | 16 #include "content/public/common/content_switches.h" |
| 17 #include "content/public/test/browser_test_utils.h" | 17 #include "content/public/test/browser_test_utils.h" |
| 18 #include "content/public/test/content_browser_test.h" |
| 19 #include "content/public/test/content_browser_test_utils.h" |
| 18 #include "content/public/test/test_utils.h" | 20 #include "content/public/test/test_utils.h" |
| 19 #include "content/shell/browser/shell.h" | 21 #include "content/shell/browser/shell.h" |
| 20 #include "content/test/content_browser_test.h" | |
| 21 #include "content/test/content_browser_test_utils.h" | |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // This is a helper function for the tests which attempt to create a | 27 // This is a helper function for the tests which attempt to create a |
| 28 // duplicate RenderViewHost or RenderWidgetHost. It tries to create two objects | 28 // duplicate RenderViewHost or RenderWidgetHost. It tries to create two objects |
| 29 // with the same process and routing ids, which causes a collision. | 29 // with the same process and routing ids, which causes a collision. |
| 30 // It creates a couple of windows in process 1, which causes a few routing ids | 30 // It creates a couple of windows in process 1, which causes a few routing ids |
| 31 // to be allocated. Then a cross-process navigation is initiated, which causes a | 31 // to be allocated. Then a cross-process navigation is initiated, which causes a |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Since this test executes on the UI thread and hopping threads might cause | 158 // Since this test executes on the UI thread and hopping threads might cause |
| 159 // different timing in the test, let's simulate a CreateNewWidget call coming | 159 // different timing in the test, let's simulate a CreateNewWidget call coming |
| 160 // from the IO thread. Use the existing window routing id to cause a | 160 // from the IO thread. Use the existing window routing id to cause a |
| 161 // deliberate collision. | 161 // deliberate collision. |
| 162 pending_rvh->CreateNewWidget(duplicate_routing_id, blink::WebPopupTypeSelect); | 162 pending_rvh->CreateNewWidget(duplicate_routing_id, blink::WebPopupTypeSelect); |
| 163 | 163 |
| 164 // If the above operation doesn't crash, the test has succeeded! | 164 // If the above operation doesn't crash, the test has succeeded! |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace content | 167 } // namespace content |
| OLD | NEW |