| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/message_box_flags.h" | 9 #include "app/message_box_flags.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 HWND tab_wnd = NULL; | 881 HWND tab_wnd = NULL; |
| 882 scoped_refptr<TabProxy> tab(proxy->CreateTabWithHostWindow(false, | 882 scoped_refptr<TabProxy> tab(proxy->CreateTabWithHostWindow(false, |
| 883 GURL(), &external_tab_container, &tab_wnd)); | 883 GURL(), &external_tab_container, &tab_wnd)); |
| 884 | 884 |
| 885 // Enter a message loop to allow the tab to be created | 885 // Enter a message loop to allow the tab to be created |
| 886 proxy->WaitForNavigation(2000); | 886 proxy->WaitForNavigation(2000); |
| 887 EXPECT_TRUE(tab->is_valid()); | 887 EXPECT_TRUE(tab->is_valid()); |
| 888 | 888 |
| 889 if (tab != NULL) { | 889 if (tab != NULL) { |
| 890 // Wait for navigation | 890 // Wait for navigation |
| 891 tab->NavigateInExternalTab(simple_data_url); | 891 tab->NavigateInExternalTab(simple_data_url, GURL()); |
| 892 EXPECT_TRUE(proxy->WaitForNavigation(action_max_timeout_ms())); | 892 EXPECT_TRUE(proxy->WaitForNavigation(action_max_timeout_ms())); |
| 893 | 893 |
| 894 // Now destroy the external tab | 894 // Now destroy the external tab |
| 895 proxy->DestroyHostWindow(); | 895 proxy->DestroyHostWindow(); |
| 896 proxy->WaitForTabCleanup(tab, action_max_timeout_ms()); | 896 proxy->WaitForTabCleanup(tab, action_max_timeout_ms()); |
| 897 | 897 |
| 898 EXPECT_FALSE(tab->is_valid()); | 898 EXPECT_FALSE(tab->is_valid()); |
| 899 EXPECT_EQ(FALSE, ::IsWindow(external_tab_container)); | 899 EXPECT_EQ(FALSE, ::IsWindow(external_tab_container)); |
| 900 EXPECT_EQ(FALSE, ::IsWindow(tab_wnd)); | 900 EXPECT_EQ(FALSE, ::IsWindow(tab_wnd)); |
| 901 } | 901 } |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 | 1182 |
| 1183 // Allow some time for the popup to show up and close. | 1183 // Allow some time for the popup to show up and close. |
| 1184 PlatformThread::Sleep(2000); | 1184 PlatformThread::Sleep(2000); |
| 1185 | 1185 |
| 1186 std::wstring expected(L"string"); | 1186 std::wstring expected(L"string"); |
| 1187 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); | 1187 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); |
| 1188 std::wstring actual; | 1188 std::wstring actual; |
| 1189 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); | 1189 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); |
| 1190 ASSERT_EQ(expected, actual); | 1190 ASSERT_EQ(expected, actual); |
| 1191 } | 1191 } |
| OLD | NEW |