| 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/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 browser()->tab_strip_model()->GetActiveWebContents()); | 80 browser()->tab_strip_model()->GetActiveWebContents()); |
| 81 chrome::Reload(browser(), CURRENT_TAB); | 81 chrome::Reload(browser(), CURRENT_TAB); |
| 82 reload_observer.Wait(); | 82 reload_observer.Wait(); |
| 83 | 83 |
| 84 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT)); | 84 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT)); |
| 85 | 85 |
| 86 // Make sure advanced print command (Ctrl+Shift+p) is enabled. | 86 // Make sure advanced print command (Ctrl+Shift+p) is enabled. |
| 87 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT)); | 87 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT)); |
| 88 } | 88 } |
| 89 | 89 |
| 90 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, TaskManagerNewPrintPreview) { | 90 // Disable the test for mac, see http://crbug/367665. |
| 91 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 92 #define MAYBE_TaskManagerNewPrintPreview DISABLED_TaskManagerNewPrintPreview |
| 93 #else |
| 94 #define MAYBE_TaskManagerNewPrintPreview TaskManagerNewPrintPreview |
| 95 #endif |
| 96 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, MAYBE_TaskManagerNewPrintPreview) { |
| 91 chrome::ShowTaskManager(browser()); // Show task manager BEFORE print dialog. | 97 chrome::ShowTaskManager(browser()); // Show task manager BEFORE print dialog. |
| 92 | 98 |
| 93 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAboutBlankTab())); | 99 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAboutBlankTab())); |
| 94 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); | 100 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); |
| 95 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnyPrint())); | 101 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnyPrint())); |
| 96 | 102 |
| 97 // Create the print preview dialog. | 103 // Create the print preview dialog. |
| 98 Print(); | 104 Print(); |
| 99 | 105 |
| 100 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAboutBlankTab())); | 106 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAboutBlankTab())); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 browser()->tab_strip_model()->ActivateTabAt(0, true); | 202 browser()->tab_strip_model()->ActivateTabAt(0, true); |
| 197 | 203 |
| 198 // Navigate main tab to hide print preview. | 204 // Navigate main tab to hide print preview. |
| 199 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); | 205 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); |
| 200 | 206 |
| 201 browser()->tab_strip_model()->ActivateTabAt(1, true); | 207 browser()->tab_strip_model()->ActivateTabAt(1, true); |
| 202 } | 208 } |
| 203 #endif | 209 #endif |
| 204 | 210 |
| 205 } // namespace | 211 } // namespace |
| OLD | NEW |