Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/command_line.h" | |
| 6 #include "chrome/browser/ui/browser_dialogs.h" | |
| 7 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" | |
| 8 #include "chrome/browser/ui/test/test_browser_dialog.h" | |
| 9 #include "ui/base/ui_base_switches.h" | |
| 10 | |
| 11 class UpdateRecommendedDialogTest : public DialogBrowserTest { | |
| 12 public: | |
| 13 UpdateRecommendedDialogTest() {} | |
| 14 | |
| 15 // TestDialogInterface: | |
| 16 void ShowDialog(const std::string& name) override { | |
| 17 InProcessBrowserTest::browser()->window()->ShowUpdateChromeDialog(); | |
| 18 } | |
| 19 }; | |
|
tapted
2017/01/24 00:28:11
nit: private:
DISALLOW_..
Greg K
2017/01/24 00:46:49
Done.
| |
| 20 | |
| 21 // Runs with --secondary-ui-md. | |
| 22 class UpdateRecommendedDialogTestMd : public UpdateRecommendedDialogTest { | |
| 23 public: | |
| 24 UpdateRecommendedDialogTestMd() {} | |
| 25 | |
| 26 // content::BrowserTestBase: | |
| 27 void SetUpCommandLine(base::CommandLine* command_line) override { | |
|
tapted
2017/01/24 00:28:11
I think we can just collapse this into the test ab
Greg K
2017/01/24 00:46:49
Done.
| |
| 28 command_line->AppendSwitch(switches::kExtendMdToSecondaryUi); | |
| 29 } | |
| 30 | |
| 31 private: | |
| 32 DISALLOW_COPY_AND_ASSIGN(UpdateRecommendedDialogTestMd); | |
| 33 }; | |
| 34 | |
| 35 // Test that calls ShowDialog("default"). Interactive when run via | |
| 36 // browser_tests --gtest_filter=BrowserDialogTest.Invoke --interactive | |
| 37 // --dialog=UpdateRecommendedDialogTestMd.InvokeDialog_default | |
| 38 IN_PROC_BROWSER_TEST_F(UpdateRecommendedDialogTestMd, InvokeDialog_default) { | |
| 39 RunDialog(); | |
| 40 } | |
| OLD | NEW |