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 "chrome/browser/renderer_context_menu/spelling_bubble_model.h" | |
| 6 #include "chrome/browser/ui/confirm_bubble.h" | |
| 7 #include "chrome/browser/ui/tabs/tab_strip_model.h" | |
| 8 #include "chrome/browser/ui/test/test_browser_dialog.h" | |
| 9 | |
| 10 class AskGoogleForSuggestionsDialogTest : public DialogBrowserTest { | |
| 11 public: | |
| 12 AskGoogleForSuggestionsDialogTest() {} | |
| 13 | |
| 14 // DialogBrowserTest: | |
| 15 void ShowDialog(const std::string& name) override { | |
| 16 std::unique_ptr<SpellingBubbleModel> model = | |
| 17 base::MakeUnique<SpellingBubbleModel>( | |
| 18 browser()->profile(), | |
| 19 browser()->tab_strip_model()->GetActiveWebContents()); | |
| 20 | |
| 21 // The toolkit-views version of the dialog does not utilize the anchor_view | |
| 22 // and origin parameters passed to this function. Pass dummy values. | |
| 23 chrome::ShowConfirmBubble(DialogParent(), nullptr, gfx::Point(), | |
| 24 std::move(model)); | |
| 25 } | |
| 26 | |
| 27 private: | |
| 28 DISALLOW_COPY_AND_ASSIGN(AskGoogleForSuggestionsDialogTest); | |
| 29 }; | |
| 30 | |
| 31 #if !defined(OS_MACOSX) | |
| 32 // Initially disabled except on Mac due to http://crbug.com/683808. | |
|
karandeepb
2017/01/25 11:08:28
This seems to be failing on Linux and windows on t
tapted
2017/01/27 02:09:50
We can try depending on the fix(es) for crbug.com/
tapted
2017/01/31 23:52:39
The fix for this has landed in r447216, so it shou
karandeepb
2017/02/01 00:01:18
Will submit a patch.
| |
| 33 #define MAYBE_InvokeDialog_default DISABLED_InvokeDialog_default | |
| 34 #else | |
| 35 #define MAYBE_InvokeDialog_default InvokeDialog_default | |
| 36 #endif | |
| 37 | |
| 38 // Test that calls ShowDialog("default"). Interactive when run via | |
| 39 // browser_tests --gtest_filter=BrowserDialogTest.Invoke --interactive | |
| 40 // --dialog=AskGoogleForSuggestionsDialogTest.InvokeDialog_default | |
| 41 IN_PROC_BROWSER_TEST_F(AskGoogleForSuggestionsDialogTest, | |
| 42 MAYBE_InvokeDialog_default) { | |
| 43 RunDialog(); | |
| 44 } | |
| OLD | NEW |