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

Side by Side Diff: chrome/browser/ui/ask_google_for_suggestions_dialog_browsertest.cc

Issue 2650583012: MacViews: Enable views based Ask Google For Suggestions dialog behind secondary-ui-md flag. (Closed)
Patch Set: Rebase. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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/memory/ptr_util.h"
6 #include "chrome/browser/renderer_context_menu/spelling_bubble_model.h"
7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_window.h"
9 #include "chrome/browser/ui/confirm_bubble.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/browser/ui/test/test_browser_dialog.h"
12
13 class AskGoogleForSuggestionsDialogTest : public DialogBrowserTest {
14 public:
15 AskGoogleForSuggestionsDialogTest() {}
16
17 // DialogBrowserTest:
18 void ShowDialog(const std::string& name) override {
19 std::unique_ptr<SpellingBubbleModel> model =
20 base::MakeUnique<SpellingBubbleModel>(
21 browser()->profile(),
22 browser()->tab_strip_model()->GetActiveWebContents());
23
24 // The toolkit-views version of the dialog does not utilize the anchor_view
25 // and origin parameters passed to this function. Pass dummy values.
26 chrome::ShowConfirmBubble(browser()->window()->GetNativeWindow(), nullptr,
27 gfx::Point(), std::move(model));
28 }
29
30 private:
31 DISALLOW_COPY_AND_ASSIGN(AskGoogleForSuggestionsDialogTest);
32 };
33
34 #if !defined(OS_MACOSX)
35 // Initially disabled except on Mac due to http://crbug.com/683808.
36 #define MAYBE_InvokeDialog_default DISABLED_InvokeDialog_default
37 #else
38 #define MAYBE_InvokeDialog_default InvokeDialog_default
39 #endif
40
41 // Test that calls ShowDialog("default"). Interactive when run via
42 // browser_tests --gtest_filter=BrowserDialogTest.Invoke --interactive
43 // --dialog=AskGoogleForSuggestionsDialogTest.InvokeDialog_default
44 IN_PROC_BROWSER_TEST_F(AskGoogleForSuggestionsDialogTest,
45 MAYBE_InvokeDialog_default) {
46 RunDialog();
47 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698