Commit d16b10ac authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

polychrome: disable modal animations in PrintPreviewDialogControllerBrowserTest

These tests don't work when using a Mac printing dialog with MacViews, because
the modal closure animation makes window closure very asynchronous. Disable
it altogether in this set of tests.

Bug: 817408
Change-Id: Idb1bd814e9248e0cbd8d07e3426084c72db06d65
Reviewed-on: https://chromium-review.googlesource.com/975521Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545089}
parent 9427879e
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <memory> #include <memory>
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/location.h" #include "base/location.h"
#include "base/macros.h" #include "base/macros.h"
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
#include "content/public/test/browser_test_utils.h" #include "content/public/test/browser_test_utils.h"
#include "ipc/ipc_message_macros.h" #include "ipc/ipc_message_macros.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/ui_base_switches.h"
#include "url/gurl.h" #include "url/gurl.h"
#include "url/origin.h" #include "url/origin.h"
...@@ -182,6 +184,11 @@ class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest { ...@@ -182,6 +184,11 @@ class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest {
private: private:
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
#if defined(OS_MACOSX)
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisableModalAnimations);
#endif
WebContents* first_tab = WebContents* first_tab =
browser()->tab_strip_model()->GetActiveWebContents(); browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(first_tab); ASSERT_TRUE(first_tab);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment