| Index: chrome/browser/apps/app_browsertest.cc
|
| diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
|
| index ec4a1a5858531adbf50d70135e75ee34cc8338f1..951fd093297f88b534d1dbf3ffe5be655e2e1ab0 100644
|
| --- a/chrome/browser/apps/app_browsertest.cc
|
| +++ b/chrome/browser/apps/app_browsertest.cc
|
| @@ -31,6 +31,7 @@
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/extensions/application_launch.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| +#include "chrome/browser/ui/webui/print_preview/print_preview_ui.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/extensions/api/app_runtime.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -1036,6 +1037,24 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_WebContentsHasFocus) {
|
| GetRenderWidgetHostView()->HasFocus());
|
| }
|
|
|
| +// Currently this test only works if the PDF preview plug-in is available. This
|
| +// will only happen in Chrome release builds or if the plug-in has been manually
|
| +// copied from a Chrome release build. In the former case, this test will run
|
| +// automatically. In the later case, it can be run manually by commenting out
|
| +// the next three lines and the corresponding #endif and then running
|
| +// browser_tests with a --enable-print-preview flag.
|
| +#if !defined(GOOGLE_CHROME_BUILD)
|
| +#define MAYBE_WindowDotPrintWorks DISABLED_WindowDotPrintWorks
|
| +#else
|
| +#define MAYBE_WindowDotPrintWorks WindowDotPrintWorks
|
| +#endif
|
| +
|
| +IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_WindowDotPrintWorks) {
|
| + PrintPreviewUI::SetAutoCancelForTesting(true);
|
| + ASSERT_TRUE(RunPlatformAppTest("platform_apps/print_api")) << message_;
|
| + PrintPreviewUI::SetAutoCancelForTesting(false);
|
| +}
|
| +
|
|
|
| #if defined(OS_CHROMEOS)
|
|
|
|
|