| 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 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1711 common_params.url = GURL("data:text/html,world"); | 1711 common_params.url = GURL("data:text/html,world"); |
| 1712 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; | 1712 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; |
| 1713 common_params.transition = ui::PAGE_TRANSITION_TYPED; | 1713 common_params.transition = ui::PAGE_TRANSITION_TYPED; |
| 1714 common_params.navigation_start = base::TimeTicks::FromInternalValue(1); | 1714 common_params.navigation_start = base::TimeTicks::FromInternalValue(1); |
| 1715 request_params.current_history_list_length = 1; | 1715 request_params.current_history_list_length = 1; |
| 1716 request_params.current_history_list_offset = 0; | 1716 request_params.current_history_list_offset = 0; |
| 1717 request_params.pending_history_list_offset = 1; | 1717 request_params.pending_history_list_offset = 1; |
| 1718 | 1718 |
| 1719 TestRenderFrame* subframe = | 1719 TestRenderFrame* subframe = |
| 1720 static_cast<TestRenderFrame*>(RenderFrameImpl::FromWebFrame( | 1720 static_cast<TestRenderFrame*>(RenderFrameImpl::FromWebFrame( |
| 1721 view()->webview()->FindFrameByName("frame"))); | 1721 frame()->GetWebFrame()->FindFrameByName("frame"))); |
| 1722 subframe->Navigate(common_params, StartNavigationParams(), request_params); | 1722 subframe->Navigate(common_params, StartNavigationParams(), request_params); |
| 1723 FrameLoadWaiter(subframe).Wait(); | 1723 FrameLoadWaiter(subframe).Wait(); |
| 1724 | 1724 |
| 1725 // Copy the document content to std::wstring and compare with the | 1725 // Copy the document content to std::wstring and compare with the |
| 1726 // expected result. | 1726 // expected result. |
| 1727 const int kMaxOutputCharacters = 256; | 1727 const int kMaxOutputCharacters = 256; |
| 1728 std::string output = WebFrameContentDumper::DumpWebViewAsText( | 1728 std::string output = WebFrameContentDumper::DumpWebViewAsText( |
| 1729 view()->GetWebView(), kMaxOutputCharacters) | 1729 view()->GetWebView(), kMaxOutputCharacters) |
| 1730 .Utf8(); | 1730 .Utf8(); |
| 1731 EXPECT_EQ(output, "hello \n\nworld"); | 1731 EXPECT_EQ(output, "hello \n\nworld"); |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2591 ExpectPauseAndResume(3); | 2591 ExpectPauseAndResume(3); |
| 2592 blink::WebScriptSource source2( | 2592 blink::WebScriptSource source2( |
| 2593 WebString::FromUTF8("function func2() { func1(); }; func2();")); | 2593 WebString::FromUTF8("function func2() { func1(); }; func2();")); |
| 2594 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); | 2594 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); |
| 2595 | 2595 |
| 2596 EXPECT_FALSE(IsPaused()); | 2596 EXPECT_FALSE(IsPaused()); |
| 2597 Detach(); | 2597 Detach(); |
| 2598 } | 2598 } |
| 2599 | 2599 |
| 2600 } // namespace content | 2600 } // namespace content |
| OLD | NEW |