| 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" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_commands.h" | 12 #include "chrome/browser/ui/browser_commands.h" |
| 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 #include "chrome/test/base/in_process_browser_test.h" | 17 #include "chrome/test/base/in_process_browser_test.h" |
| 18 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
| 19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 20 #include "content/public/browser/web_contents_observer.h" | 20 #include "content/public/browser/web_contents_observer.h" |
| 21 #include "content/public/test/browser_test_utils.h" | 21 #include "content/public/test/browser_test_utils.h" |
| 22 #include "content/public/test/test_navigation_observer.h" | 22 #include "content/public/test/test_navigation_observer.h" |
| 23 #include "content/public/test/test_utils.h" | 23 #include "content/public/test/test_utils.h" |
| 24 | 24 |
| 25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
| 26 #include "content/public/browser/web_contents_view.h" | 26 #include "content/public/browser/web_contents_view.h" |
| 27 #include "ui/aura/root_window.h" | |
| 28 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
| 28 #include "ui/aura/window_event_dispatcher.h" |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 class PrintPreviewTest : public InProcessBrowserTest { | 33 class PrintPreviewTest : public InProcessBrowserTest { |
| 34 public: | 34 public: |
| 35 PrintPreviewTest() {} | 35 PrintPreviewTest() {} |
| 36 | 36 |
| 37 #if !defined(GOOGLE_CHROME_BUILD) | 37 #if !defined(GOOGLE_CHROME_BUILD) |
| 38 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 38 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 browser()->tab_strip_model()->ActivateTabAt(0, true); | 153 browser()->tab_strip_model()->ActivateTabAt(0, true); |
| 154 | 154 |
| 155 // Navigate main tab to hide print preview. | 155 // Navigate main tab to hide print preview. |
| 156 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); | 156 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); |
| 157 | 157 |
| 158 browser()->tab_strip_model()->ActivateTabAt(1, true); | 158 browser()->tab_strip_model()->ActivateTabAt(1, true); |
| 159 } | 159 } |
| 160 #endif | 160 #endif |
| 161 | 161 |
| 162 } // namespace | 162 } // namespace |
| OLD | NEW |