| 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 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 view()->webview()->findFrameByName("frame"))); | 1728 view()->webview()->findFrameByName("frame"))); |
| 1729 subframe->Navigate(common_params, StartNavigationParams(), request_params); | 1729 subframe->Navigate(common_params, StartNavigationParams(), request_params); |
| 1730 FrameLoadWaiter(subframe).Wait(); | 1730 FrameLoadWaiter(subframe).Wait(); |
| 1731 | 1731 |
| 1732 // Copy the document content to std::wstring and compare with the | 1732 // Copy the document content to std::wstring and compare with the |
| 1733 // expected result. | 1733 // expected result. |
| 1734 const int kMaxOutputCharacters = 256; | 1734 const int kMaxOutputCharacters = 256; |
| 1735 std::string output = base::UTF16ToUTF8( | 1735 std::string output = base::UTF16ToUTF8( |
| 1736 base::StringPiece16(WebFrameContentDumper::dumpWebViewAsText( | 1736 base::StringPiece16(WebFrameContentDumper::dumpWebViewAsText( |
| 1737 view()->GetWebView(), kMaxOutputCharacters))); | 1737 view()->GetWebView(), kMaxOutputCharacters))); |
| 1738 EXPECT_EQ(output, "hello \n\nworld"); | 1738 EXPECT_EQ(output, "hello \n\nworld"); |
| 1739 } | 1739 } |
| 1740 | 1740 |
| 1741 // This test ensures that a RenderFrame object is created for the top level | 1741 // This test ensures that a RenderFrame object is created for the top level |
| 1742 // frame in the RenderView. | 1742 // frame in the RenderView. |
| 1743 TEST_F(RenderViewImplTest, BasicRenderFrame) { | 1743 TEST_F(RenderViewImplTest, BasicRenderFrame) { |
| 1744 EXPECT_TRUE(view()->main_render_frame_); | 1744 EXPECT_TRUE(view()->main_render_frame_); |
| 1745 } | 1745 } |
| 1746 | 1746 |
| 1747 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) { | 1747 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) { |
| 1748 LoadHTML("<textarea id=\"test\"></textarea>"); | 1748 LoadHTML("<textarea id=\"test\"></textarea>"); |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2483 ExpectPauseAndResume(3); | 2483 ExpectPauseAndResume(3); |
| 2484 blink::WebScriptSource source2( | 2484 blink::WebScriptSource source2( |
| 2485 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2485 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
| 2486 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); | 2486 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); |
| 2487 | 2487 |
| 2488 EXPECT_FALSE(IsPaused()); | 2488 EXPECT_FALSE(IsPaused()); |
| 2489 Detach(); | 2489 Detach(); |
| 2490 } | 2490 } |
| 2491 | 2491 |
| 2492 } // namespace content | 2492 } // namespace content |
| OLD | NEW |