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

Side by Side Diff: chrome/browser/ui/views/translate/translate_bubble_view_browsertest.cc

Issue 2952163002: Remove InProcessBrowserTest::SetUpOnMainThread() calls. (Closed)
Patch Set: rebase Created 3 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" 5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chrome/browser/chrome_notification_types.h" 11 #include "chrome/browser/chrome_notification_types.h"
12 #include "chrome/browser/translate/chrome_translate_client.h" 12 #include "chrome/browser/translate/chrome_translate_client.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/browser_commands.h" 14 #include "chrome/browser/ui/browser_commands.h"
15 #include "chrome/browser/ui/browser_tabstrip.h" 15 #include "chrome/browser/ui/browser_tabstrip.h"
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" 16 #include "chrome/browser/ui/tabs/tab_strip_model.h"
17 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
18 #include "chrome/test/base/in_process_browser_test.h" 18 #include "chrome/test/base/in_process_browser_test.h"
19 #include "chrome/test/base/ui_test_utils.h" 19 #include "chrome/test/base/ui_test_utils.h"
20 #include "components/translate/core/common/language_detection_details.h" 20 #include "components/translate/core/common/language_detection_details.h"
21 #include "content/public/browser/notification_details.h" 21 #include "content/public/browser/notification_details.h"
22 22
23 class TranslateBubbleViewBrowserTest : public InProcessBrowserTest { 23 class TranslateBubbleViewBrowserTest : public InProcessBrowserTest {
24 public: 24 public:
25 TranslateBubbleViewBrowserTest() {} 25 TranslateBubbleViewBrowserTest() {}
26 ~TranslateBubbleViewBrowserTest() override {} 26 ~TranslateBubbleViewBrowserTest() override {}
27 void SetUpOnMainThread() override {
28 InProcessBrowserTest::SetUpOnMainThread();
29 }
30 27
31 private: 28 private:
32 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleViewBrowserTest); 29 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleViewBrowserTest);
33 }; 30 };
34 31
35 // Flaky: crbug.com/394066 32 // Flaky: crbug.com/394066
36 IN_PROC_BROWSER_TEST_F(TranslateBubbleViewBrowserTest, 33 IN_PROC_BROWSER_TEST_F(TranslateBubbleViewBrowserTest,
37 DISABLED_CloseBrowserWithoutTranslating) { 34 DISABLED_CloseBrowserWithoutTranslating) {
38 EXPECT_FALSE(TranslateBubbleView::GetCurrentBubble()); 35 EXPECT_FALSE(TranslateBubbleView::GetCurrentBubble());
39 36
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 chrome::CloseWebContents(browser(), web_contents, false); 102 chrome::CloseWebContents(browser(), web_contents, false);
106 EXPECT_EQ(active_index, browser()->tab_strip_model()->active_index()); 103 EXPECT_EQ(active_index, browser()->tab_strip_model()->active_index());
107 EXPECT_EQ(1, browser()->tab_strip_model()->count()); 104 EXPECT_EQ(1, browser()->tab_strip_model()->count());
108 EXPECT_FALSE(TranslateBubbleView::GetCurrentBubble()); 105 EXPECT_FALSE(TranslateBubbleView::GetCurrentBubble());
109 106
110 // Close the last tab. 107 // Close the last tab.
111 chrome::CloseWebContents(browser(), 108 chrome::CloseWebContents(browser(),
112 browser()->tab_strip_model()->GetActiveWebContents(), 109 browser()->tab_strip_model()->GetActiveWebContents(),
113 false); 110 false);
114 } 111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698