OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/location.h" | 5 #include "base/location.h" |
6 #include "base/single_thread_task_runner.h" | 6 #include "base/single_thread_task_runner.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 // Wait for the embedder to receive a 'newwindow' event. | 816 // Wait for the embedder to receive a 'newwindow' event. |
817 ASSERT_TRUE(done_listener->WaitUntilSatisfied()); | 817 ASSERT_TRUE(done_listener->WaitUntilSatisfied()); |
818 } | 818 } |
819 #endif | 819 #endif |
820 | 820 |
821 IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, | 821 IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, |
822 NewWindow_OpenerDestroyedWhileUnattached) { | 822 NewWindow_OpenerDestroyedWhileUnattached) { |
823 TestHelper("testNewWindowOpenerDestroyedWhileUnattached", | 823 TestHelper("testNewWindowOpenerDestroyedWhileUnattached", |
824 "web_view/newwindow", | 824 "web_view/newwindow", |
825 NEEDS_TEST_SERVER); | 825 NEEDS_TEST_SERVER); |
826 ASSERT_EQ(2, GetGuestViewManager()->num_guests_created()); | 826 ASSERT_EQ(2u, GetGuestViewManager()->num_guests_created()); |
827 | 827 |
828 // We have two guests in this test, one is the intial one, the other | 828 // We have two guests in this test, one is the intial one, the other |
829 // is the newwindow one. | 829 // is the newwindow one. |
830 // Before the embedder goes away, both the guests should go away. | 830 // Before the embedder goes away, both the guests should go away. |
831 // This ensures that unattached guests are gone if opener is gone. | 831 // This ensures that unattached guests are gone if opener is gone. |
832 GetGuestViewManager()->WaitForAllGuestsDeleted(); | 832 GetGuestViewManager()->WaitForAllGuestsDeleted(); |
833 } | 833 } |
834 | 834 |
835 // Tests whether <webview> context menu sees <webview> local coordinates | 835 // Tests whether <webview> context menu sees <webview> local coordinates |
836 // in its RenderViewContextMenu params. | 836 // in its RenderViewContextMenu params. |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 | 1151 |
1152 // Now verify that the selection text propagates properly to RWHV. | 1152 // Now verify that the selection text propagates properly to RWHV. |
1153 content::RenderWidgetHostView* guest_rwhv = | 1153 content::RenderWidgetHostView* guest_rwhv = |
1154 guest_web_contents()->GetRenderWidgetHostView(); | 1154 guest_web_contents()->GetRenderWidgetHostView(); |
1155 ASSERT_TRUE(guest_rwhv); | 1155 ASSERT_TRUE(guest_rwhv); |
1156 std::string selected_text = base::UTF16ToUTF8(guest_rwhv->GetSelectedText()); | 1156 std::string selected_text = base::UTF16ToUTF8(guest_rwhv->GetSelectedText()); |
1157 ASSERT_TRUE(selected_text.size() >= 10u); | 1157 ASSERT_TRUE(selected_text.size() >= 10u); |
1158 ASSERT_EQ("AAAAAAAAAA", selected_text.substr(0, 10)); | 1158 ASSERT_EQ("AAAAAAAAAA", selected_text.substr(0, 10)); |
1159 } | 1159 } |
1160 #endif | 1160 #endif |
OLD | NEW |