Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1063)

Unified Diff: chrome/browser/ui/update_chrome_dialog_browsertest.cc

Issue 2652823003: Add "Relaunch Chrome" dialog to Mac Views. (Closed)
Patch Set: Fix nits Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/update_chrome_dialog_browsertest.cc
diff --git a/chrome/browser/ui/update_chrome_dialog_browsertest.cc b/chrome/browser/ui/update_chrome_dialog_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..eb57550b19a05108fbdd49f2d20f7a5df134cd4e
--- /dev/null
+++ b/chrome/browser/ui/update_chrome_dialog_browsertest.cc
@@ -0,0 +1,41 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// 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_window.h"
+#include "chrome/browser/ui/test/test_browser_dialog.h"
+#include "ui/base/ui_base_switches.h"
+
+class UpdateRecommendedDialogTest : public DialogBrowserTest {
+ public:
+ UpdateRecommendedDialogTest() {}
+
+ // DialogBrowserTest:
+ 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);
+};
+
+#if !defined(OS_MACOSX)
+// Initially disabled except on Mac due to http://crbug.com/683808.
+#define MAYBE_InvokeDialog_default DISABLED_InvokeDialog_default
+#else
+#define MAYBE_InvokeDialog_default InvokeDialog_default
+#endif
+
+// 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,
+ MAYBE_InvokeDialog_default) {
+ RunDialog();
+}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/views/browser_dialogs_views_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698