OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <tuple> | 7 #include <tuple> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "content/common/renderer.mojom.h" | 32 #include "content/common/renderer.mojom.h" |
33 #include "content/common/site_isolation_policy.h" | 33 #include "content/common/site_isolation_policy.h" |
34 #include "content/common/view_messages.h" | 34 #include "content/common/view_messages.h" |
35 #include "content/public/browser/browser_context.h" | 35 #include "content/public/browser/browser_context.h" |
36 #include "content/public/browser/native_web_keyboard_event.h" | 36 #include "content/public/browser/native_web_keyboard_event.h" |
37 #include "content/public/browser/web_ui_controller_factory.h" | 37 #include "content/public/browser/web_ui_controller_factory.h" |
38 #include "content/public/common/bindings_policy.h" | 38 #include "content/public/common/bindings_policy.h" |
39 #include "content/public/common/browser_side_navigation_policy.h" | 39 #include "content/public/common/browser_side_navigation_policy.h" |
40 #include "content/public/common/content_switches.h" | 40 #include "content/public/common/content_switches.h" |
41 #include "content/public/common/page_zoom.h" | 41 #include "content/public/common/page_zoom.h" |
| 42 #include "content/public/common/resource_request_body.h" |
42 #include "content/public/common/url_constants.h" | 43 #include "content/public/common/url_constants.h" |
43 #include "content/public/common/url_utils.h" | 44 #include "content/public/common/url_utils.h" |
44 #include "content/public/renderer/content_renderer_client.h" | 45 #include "content/public/renderer/content_renderer_client.h" |
45 #include "content/public/renderer/document_state.h" | 46 #include "content/public/renderer/document_state.h" |
46 #include "content/public/renderer/navigation_state.h" | 47 #include "content/public/renderer/navigation_state.h" |
47 #include "content/public/test/browser_test_utils.h" | 48 #include "content/public/test/browser_test_utils.h" |
48 #include "content/public/test/frame_load_waiter.h" | 49 #include "content/public/test/frame_load_waiter.h" |
49 #include "content/public/test/render_view_test.h" | 50 #include "content/public/test/render_view_test.h" |
50 #include "content/public/test/test_utils.h" | 51 #include "content/public/test/test_utils.h" |
51 #include "content/renderer/accessibility/render_accessibility_impl.h" | 52 #include "content/renderer/accessibility/render_accessibility_impl.h" |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 StartNavigationParams start_params; | 603 StartNavigationParams start_params; |
603 RequestNavigationParams request_params; | 604 RequestNavigationParams request_params; |
604 common_params.url = GURL("data:text/html,<div>Page</div>"); | 605 common_params.url = GURL("data:text/html,<div>Page</div>"); |
605 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; | 606 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; |
606 common_params.transition = ui::PAGE_TRANSITION_TYPED; | 607 common_params.transition = ui::PAGE_TRANSITION_TYPED; |
607 common_params.method = "POST"; | 608 common_params.method = "POST"; |
608 | 609 |
609 // Set up post data. | 610 // Set up post data. |
610 const char raw_data[] = "post \0\ndata"; | 611 const char raw_data[] = "post \0\ndata"; |
611 const size_t length = arraysize(raw_data); | 612 const size_t length = arraysize(raw_data); |
612 scoped_refptr<ResourceRequestBodyImpl> post_data(new ResourceRequestBodyImpl); | 613 scoped_refptr<ResourceRequestBody> post_data(new ResourceRequestBody); |
613 post_data->AppendBytes(raw_data, length); | 614 post_data->AppendBytes(raw_data, length); |
614 common_params.post_data = post_data; | 615 common_params.post_data = post_data; |
615 | 616 |
616 frame()->Navigate(common_params, start_params, request_params); | 617 frame()->Navigate(common_params, start_params, request_params); |
617 base::RunLoop().RunUntilIdle(); | 618 base::RunLoop().RunUntilIdle(); |
618 | 619 |
619 const IPC::Message* frame_navigate_msg = | 620 const IPC::Message* frame_navigate_msg = |
620 render_thread_->sink().GetUniqueMessageMatching( | 621 render_thread_->sink().GetUniqueMessageMatching( |
621 FrameHostMsg_DidCommitProvisionalLoad::ID); | 622 FrameHostMsg_DidCommitProvisionalLoad::ID); |
622 EXPECT_TRUE(frame_navigate_msg); | 623 EXPECT_TRUE(frame_navigate_msg); |
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2614 ExpectPauseAndResume(3); | 2615 ExpectPauseAndResume(3); |
2615 blink::WebScriptSource source2( | 2616 blink::WebScriptSource source2( |
2616 WebString::FromUTF8("function func2() { func1(); }; func2();")); | 2617 WebString::FromUTF8("function func2() { func1(); }; func2();")); |
2617 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); | 2618 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); |
2618 | 2619 |
2619 EXPECT_FALSE(IsPaused()); | 2620 EXPECT_FALSE(IsPaused()); |
2620 Detach(); | 2621 Detach(); |
2621 } | 2622 } |
2622 | 2623 |
2623 } // namespace content | 2624 } // namespace content |
OLD | NEW |