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

Side by Side Diff: chrome/browser/ui/cocoa/task_manager_mac_browsertest.mm

Issue 2957983002: Remove pointless InProcessBrowserTest calls. (Closed)
Patch Set: build 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/pattern.h" 9 #include "base/strings/pattern.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void SetUpOnMainThread() override { 43 void SetUpOnMainThread() override {
44 ASSERT_FALSE(GetTaskManagerMac()); 44 ASSERT_FALSE(GetTaskManagerMac());
45 host_resolver()->AddRule("*", "127.0.0.1"); 45 host_resolver()->AddRule("*", "127.0.0.1");
46 ASSERT_TRUE(embedded_test_server()->Start()); 46 ASSERT_TRUE(embedded_test_server()->Start());
47 } 47 }
48 48
49 void TearDownOnMainThread() override { 49 void TearDownOnMainThread() override {
50 // Make sure the task manager is closed (if any). 50 // Make sure the task manager is closed (if any).
51 chrome::HideTaskManager(); 51 chrome::HideTaskManager();
52 ASSERT_FALSE(GetTaskManagerMac()); 52 ASSERT_FALSE(GetTaskManagerMac());
53
54 InProcessBrowserTest::TearDownOnMainThread();
55 } 53 }
56 54
57 TaskManagerMac* GetTaskManagerMac() const { 55 TaskManagerMac* GetTaskManagerMac() const {
58 return TaskManagerMac::GetInstanceForTests(); 56 return TaskManagerMac::GetInstanceForTests();
59 } 57 }
60 58
61 NSTableView* GetTable() const { 59 NSTableView* GetTable() const {
62 return GetTaskManagerMac() ? [GetTaskManagerMac()->CocoaControllerForTests() 60 return GetTaskManagerMac() ? [GetTaskManagerMac()->CocoaControllerForTests()
63 tableViewForTesting] 61 tableViewForTesting]
64 : nullptr; 62 : nullptr;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // tabs[2] should still be selected. 292 // tabs[2] should still be selected.
295 EXPECT_EQ(TableFirstSelectedRow(), FindRowForTab(tabs[2])); 293 EXPECT_EQ(TableFirstSelectedRow(), FindRowForTab(tabs[2]));
296 294
297 // Close tabs[0]. The selection should not change. 295 // Close tabs[0]. The selection should not change.
298 chrome::CloseWebContents(browser(), tabs[0], false); 296 chrome::CloseWebContents(browser(), tabs[0], false);
299 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows((rows -= 1), pattern)); 297 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows((rows -= 1), pattern));
300 EXPECT_EQ(TableFirstSelectedRow(), FindRowForTab(tabs[2])); 298 EXPECT_EQ(TableFirstSelectedRow(), FindRowForTab(tabs[2]));
301 } 299 }
302 300
303 } // namespace task_manager 301 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_command_controller_browsertest.cc ('k') | chrome/browser/ui/profile_error_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698