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

Side by Side Diff: chrome/browser/task_manager/task_manager_browsertest.cc

Issue 2910843002: [Cleanup] Move all browsertests to use ScopedFeatureList to modify features
Patch Set: rebase update Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <stddef.h> 5 #include <stddef.h>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/test/scoped_feature_list.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/devtools/devtools_window_testing.h" 17 #include "chrome/browser/devtools/devtools_window_testing.h"
17 #include "chrome/browser/extensions/extension_browsertest.h" 18 #include "chrome/browser/extensions/extension_browsertest.h"
18 #include "chrome/browser/extensions/extension_service.h" 19 #include "chrome/browser/extensions/extension_service.h"
19 #include "chrome/browser/infobars/infobar_service.h" 20 #include "chrome/browser/infobars/infobar_service.h"
20 #include "chrome/browser/notifications/notification.h" 21 #include "chrome/browser/notifications/notification.h"
21 #include "chrome/browser/notifications/notification_test_util.h" 22 #include "chrome/browser/notifications/notification_test_util.h"
22 #include "chrome/browser/notifications/notification_ui_manager.h" 23 #include "chrome/browser/notifications/notification_ui_manager.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 DISALLOW_COPY_AND_ASSIGN(TaskManagerUtilityProcessBrowserTest); 180 DISALLOW_COPY_AND_ASSIGN(TaskManagerUtilityProcessBrowserTest);
180 }; 181 };
181 182
182 class TaskManagerMemoryCoordinatorBrowserTest : public TaskManagerBrowserTest { 183 class TaskManagerMemoryCoordinatorBrowserTest : public TaskManagerBrowserTest {
183 public: 184 public:
184 TaskManagerMemoryCoordinatorBrowserTest() {} 185 TaskManagerMemoryCoordinatorBrowserTest() {}
185 ~TaskManagerMemoryCoordinatorBrowserTest() override {} 186 ~TaskManagerMemoryCoordinatorBrowserTest() override {}
186 187
187 protected: 188 protected:
188 void SetUpCommandLine(base::CommandLine* command_line) override { 189 void SetUpCommandLine(base::CommandLine* command_line) override {
189 command_line->AppendSwitchASCII(switches::kEnableFeatures, 190 scoped_feature_list_.InitAndEnableFeature(features::kMemoryCoordinator);
190 features::kMemoryCoordinator.name);
191 } 191 }
192 192
193 private: 193 private:
194 base::test::ScopedFeatureList scoped_feature_list_;
194 DISALLOW_COPY_AND_ASSIGN(TaskManagerMemoryCoordinatorBrowserTest); 195 DISALLOW_COPY_AND_ASSIGN(TaskManagerMemoryCoordinatorBrowserTest);
195 }; 196 };
196 197
197 // Parameterized variant of TaskManagerBrowserTest which runs with/without 198 // Parameterized variant of TaskManagerBrowserTest which runs with/without
198 // --site-per-process, which enables out of process iframes (OOPIFs). 199 // --site-per-process, which enables out of process iframes (OOPIFs).
199 class TaskManagerOOPIFBrowserTest : public TaskManagerBrowserTest, 200 class TaskManagerOOPIFBrowserTest : public TaskManagerBrowserTest,
200 public testing::WithParamInterface<bool> { 201 public testing::WithParamInterface<bool> {
201 public: 202 public:
202 TaskManagerOOPIFBrowserTest() {} 203 TaskManagerOOPIFBrowserTest() {}
203 204
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 1169
1169 // Because the subframes for tab 2 are nested, their order is deterministic. 1170 // Because the subframes for tab 2 are nested, their order is deterministic.
1170 EXPECT_EQ("Subframe: http://a.com/", 1171 EXPECT_EQ("Subframe: http://a.com/",
1171 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 1))); 1172 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 1)));
1172 EXPECT_EQ("Subframe: http://c.com/", 1173 EXPECT_EQ("Subframe: http://c.com/",
1173 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 2))); 1174 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 2)));
1174 EXPECT_EQ("Subframe: http://b.com/", 1175 EXPECT_EQ("Subframe: http://b.com/",
1175 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 3))); 1176 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 3)));
1176 } 1177 }
1177 } 1178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698