| 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 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1885 // but won't complete synchronously. | 1885 // but won't complete synchronously. |
| 1886 CommonNavigationParams common_params; | 1886 CommonNavigationParams common_params; |
| 1887 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; | 1887 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; |
| 1888 common_params.url = GURL("data:text/html,test data"); | 1888 common_params.url = GURL("data:text/html,test data"); |
| 1889 TestRenderFrame* main_frame = static_cast<TestRenderFrame*>(frame()); | 1889 TestRenderFrame* main_frame = static_cast<TestRenderFrame*>(frame()); |
| 1890 main_frame->Navigate(common_params, StartNavigationParams(), | 1890 main_frame->Navigate(common_params, StartNavigationParams(), |
| 1891 RequestNavigationParams()); | 1891 RequestNavigationParams()); |
| 1892 | 1892 |
| 1893 // Emulate a 4xx/5xx main resource response with an empty body. | 1893 // Emulate a 4xx/5xx main resource response with an empty body. |
| 1894 main_frame->didReceiveResponse(response); | 1894 main_frame->didReceiveResponse(response); |
| 1895 main_frame->didFinishDocumentLoad(web_frame); | 1895 main_frame->didFinishDocumentLoad(); |
| 1896 main_frame->runScriptsAtDocumentReady(web_frame, true); | 1896 main_frame->runScriptsAtDocumentReady(web_frame, true); |
| 1897 | 1897 |
| 1898 // The error page itself is loaded asynchronously. | 1898 // The error page itself is loaded asynchronously. |
| 1899 FrameLoadWaiter(main_frame).Wait(); | 1899 FrameLoadWaiter(main_frame).Wait(); |
| 1900 const int kMaxOutputCharacters = 22; | 1900 const int kMaxOutputCharacters = 22; |
| 1901 EXPECT_EQ("A suffusion of yellow.", | 1901 EXPECT_EQ("A suffusion of yellow.", |
| 1902 WebFrameContentDumper::dumpWebViewAsText(view()->GetWebView(), | 1902 WebFrameContentDumper::dumpWebViewAsText(view()->GetWebView(), |
| 1903 kMaxOutputCharacters) | 1903 kMaxOutputCharacters) |
| 1904 .ascii()); | 1904 .ascii()); |
| 1905 } | 1905 } |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2593 ExpectPauseAndResume(3); | 2593 ExpectPauseAndResume(3); |
| 2594 blink::WebScriptSource source2( | 2594 blink::WebScriptSource source2( |
| 2595 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2595 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
| 2596 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1); | 2596 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1); |
| 2597 | 2597 |
| 2598 EXPECT_FALSE(IsPaused()); | 2598 EXPECT_FALSE(IsPaused()); |
| 2599 Detach(); | 2599 Detach(); |
| 2600 } | 2600 } |
| 2601 | 2601 |
| 2602 } // namespace content | 2602 } // namespace content |
| OLD | NEW |