Chromium Code Reviews| Index: chrome/browser/ui/update_chrome_dialog_browsertest.mm |
| diff --git a/chrome/browser/ui/update_chrome_dialog_browsertest.mm b/chrome/browser/ui/update_chrome_dialog_browsertest.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..faeea073389bbbcf856654ab300d0303a0465f46 |
| --- /dev/null |
| +++ b/chrome/browser/ui/update_chrome_dialog_browsertest.mm |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
|
tapted
2017/01/24 03:36:26
oh whoops - this file should be .cc, not .mm
Greg K
2017/01/24 04:11:20
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/command_line.h" |
| +#include "chrome/browser/ui/browser_dialogs.h" |
|
tapted
2017/01/24 03:36:25
we can drop this one - I don't think it's used
Greg K
2017/01/24 04:11:20
Done.
|
| +#include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
|
tapted
2017/01/24 03:36:26
chrome/browser/ui/browser_window.h
Greg K
2017/01/24 04:11:20
Done.
|
| +#include "chrome/browser/ui/test/test_browser_dialog.h" |
| +#include "ui/base/ui_base_switches.h" |
| + |
| +class UpdateRecommendedDialogTest : public DialogBrowserTest { |
| + public: |
| + UpdateRecommendedDialogTest() {} |
| + |
| + // TestDialogInterface: |
|
tapted
2017/01/24 03:36:26
whoops - this class doesn't exist (I landed a CL t
Greg K
2017/01/24 04:11:20
Done.
|
| + void ShowDialog(const std::string& name) override { |
| + InProcessBrowserTest::browser()->window()->ShowUpdateChromeDialog(); |
| + } |
| + |
| + // content::BrowserTestBase: |
| + void SetUpCommandLine(base::CommandLine* command_line) override { |
| + command_line->AppendSwitch(switches::kExtendMdToSecondaryUi); |
| + } |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(UpdateRecommendedDialogTest); |
| +}; |
| + |
| +// Test that calls ShowDialog("default"). Interactive when run via |
| +// browser_tests --gtest_filter=BrowserDialogTest.Invoke --interactive |
| +// --dialog=UpdateRecommendedDialogTest.InvokeDialog_default |
| +IN_PROC_BROWSER_TEST_F(UpdateRecommendedDialogTest, InvokeDialog_default) { |
|
tapted
2017/01/24 03:36:26
Yeah this fails on Windows 10 due to http://crbug.
Greg K
2017/01/24 04:11:20
Done.
|
| + RunDialog(); |
| +} |