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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 base::DelegateSimpleThread close_printdlg_thread(&dismisser, | 423 base::DelegateSimpleThread close_printdlg_thread(&dismisser, |
424 "close_printdlg_thread"); | 424 "close_printdlg_thread"); |
425 close_printdlg_thread.Start(); | 425 close_printdlg_thread.Start(); |
426 close_printdlg_thread.Join(); | 426 close_printdlg_thread.Join(); |
427 | 427 |
428 // Force a navigation elsewhere to verify that it's fine with it. | 428 // Force a navigation elsewhere to verify that it's fine with it. |
429 url = test_server()->GetURL("files/printing/test1.html"); | 429 url = test_server()->GetURL("files/printing/test1.html"); |
430 ui_test_utils::NavigateToURL(browser(), url); | 430 ui_test_utils::NavigateToURL(browser(), url); |
431 } | 431 } |
432 chrome::CloseWindow(browser()); | 432 chrome::CloseWindow(browser()); |
433 ui_test_utils::RunAllPendingInMessageLoop(); | 433 content::RunAllPendingInMessageLoop(); |
434 | 434 |
435 EXPECT_EQ(0., CompareWithResult(L"popup_delayed_print")) | 435 EXPECT_EQ(0., CompareWithResult(L"popup_delayed_print")) |
436 << L"popup_delayed_print"; | 436 << L"popup_delayed_print"; |
437 } | 437 } |
438 | 438 |
439 // Prints a popup and immediately closes it. http://crbug.com/7721 | 439 // Prints a popup and immediately closes it. http://crbug.com/7721 |
440 IN_PROC_BROWSER_TEST_F(PrintingLayoutTest, DISABLED_IFrame) { | 440 IN_PROC_BROWSER_TEST_F(PrintingLayoutTest, DISABLED_IFrame) { |
441 if (IsTestCaseDisabled()) | 441 if (IsTestCaseDisabled()) |
442 return; | 442 return; |
443 | 443 |
444 ASSERT_TRUE(test_server()->Start()); | 444 ASSERT_TRUE(test_server()->Start()); |
445 | 445 |
446 { | 446 { |
447 GURL url = test_server()->GetURL("files/printing/iframe.htm"); | 447 GURL url = test_server()->GetURL("files/printing/iframe.htm"); |
448 ui_test_utils::NavigateToURL(browser(), url); | 448 ui_test_utils::NavigateToURL(browser(), url); |
449 | 449 |
450 DismissTheWindow dismisser; | 450 DismissTheWindow dismisser; |
451 base::DelegateSimpleThread close_printdlg_thread(&dismisser, | 451 base::DelegateSimpleThread close_printdlg_thread(&dismisser, |
452 "close_printdlg_thread"); | 452 "close_printdlg_thread"); |
453 close_printdlg_thread.Start(); | 453 close_printdlg_thread.Start(); |
454 close_printdlg_thread.Join(); | 454 close_printdlg_thread.Join(); |
455 | 455 |
456 // Force a navigation elsewhere to verify that it's fine with it. | 456 // Force a navigation elsewhere to verify that it's fine with it. |
457 url = test_server()->GetURL("files/printing/test1.html"); | 457 url = test_server()->GetURL("files/printing/test1.html"); |
458 ui_test_utils::NavigateToURL(browser(), url); | 458 ui_test_utils::NavigateToURL(browser(), url); |
459 } | 459 } |
460 chrome::CloseWindow(browser()); | 460 chrome::CloseWindow(browser()); |
461 ui_test_utils::RunAllPendingInMessageLoop(); | 461 content::RunAllPendingInMessageLoop(); |
462 | 462 |
463 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; | 463 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; |
464 } | 464 } |
OLD | NEW |