OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <sstream> | 5 #include <sstream> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 ASSERT_TRUE(browser_proxy.get()); | 280 ASSERT_TRUE(browser_proxy.get()); |
281 scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab()); | 281 scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab()); |
282 ASSERT_TRUE(tab.get()); | 282 ASSERT_TRUE(tab.get()); |
283 | 283 |
284 // Cause the renderer to crash. | 284 // Cause the renderer to crash. |
285 #if defined(OS_WIN) || defined(USE_LINUX_BREAKPAD) | 285 #if defined(OS_WIN) || defined(USE_LINUX_BREAKPAD) |
286 expected_crashes_ = 1; | 286 expected_crashes_ = 1; |
287 #endif | 287 #endif |
288 ASSERT_TRUE(tab->NavigateToURLAsync(GURL(chrome::kAboutCrashURL))); | 288 ASSERT_TRUE(tab->NavigateToURLAsync(GURL(chrome::kAboutCrashURL))); |
289 // Wait for browser to notice the renderer crash. | 289 // Wait for browser to notice the renderer crash. |
290 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms()); | 290 base::PlatformThread::Sleep(TestTimeouts::action_timeout()); |
291 | 291 |
292 // Navigate to a new cross-site page. The browser should not wait around for | 292 // Navigate to a new cross-site page. The browser should not wait around for |
293 // the old renderer's on{before}unload handlers to run. | 293 // the old renderer's on{before}unload handlers to run. |
294 CheckTitleTest("content-sniffer-test0.html", | 294 CheckTitleTest("content-sniffer-test0.html", |
295 "Content Sniffer Test 0", 1); | 295 "Content Sniffer Test 0", 1); |
296 } | 296 } |
297 #endif // !defined(OS_MACOSX) | 297 #endif // !defined(OS_MACOSX) |
298 | 298 |
299 // Tests that cross-site navigations work when the new page does not go through | 299 // Tests that cross-site navigations work when the new page does not go through |
300 // the BufferedEventHandler (e.g., non-http{s} URLs). (Bug 1225872) | 300 // the BufferedEventHandler (e.g., non-http{s} URLs). (Bug 1225872) |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 GURL broken_url("chrome://theme"); | 405 GURL broken_url("chrome://theme"); |
406 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(broken_url)); | 406 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(broken_url)); |
407 | 407 |
408 // Make sure the navigation finishes. | 408 // Make sure the navigation finishes. |
409 std::wstring tab_title; | 409 std::wstring tab_title; |
410 EXPECT_TRUE(tab->GetTabTitle(&tab_title)); | 410 EXPECT_TRUE(tab->GetTabTitle(&tab_title)); |
411 EXPECT_EQ(L"chrome://theme/ is not available", tab_title); | 411 EXPECT_EQ(L"chrome://theme/ is not available", tab_title); |
412 } | 412 } |
413 | 413 |
414 } // namespace | 414 } // namespace |
OLD | NEW |