OLD | NEW |
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 private: | 179 private: |
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 SetUp() override { |
189 command_line->AppendSwitchASCII(switches::kEnableFeatures, | 190 scoped_feature_list_.InitAndEnableFeature(features::kMemoryCoordinator); |
190 features::kMemoryCoordinator.name); | 191 TaskManagerBrowserTest::SetUp(); |
191 } | 192 } |
192 | 193 |
193 private: | 194 private: |
| 195 base::test::ScopedFeatureList scoped_feature_list_; |
194 DISALLOW_COPY_AND_ASSIGN(TaskManagerMemoryCoordinatorBrowserTest); | 196 DISALLOW_COPY_AND_ASSIGN(TaskManagerMemoryCoordinatorBrowserTest); |
195 }; | 197 }; |
196 | 198 |
197 // Parameterized variant of TaskManagerBrowserTest which runs with/without | 199 // Parameterized variant of TaskManagerBrowserTest which runs with/without |
198 // --site-per-process, which enables out of process iframes (OOPIFs). | 200 // --site-per-process, which enables out of process iframes (OOPIFs). |
199 class TaskManagerOOPIFBrowserTest : public TaskManagerBrowserTest, | 201 class TaskManagerOOPIFBrowserTest : public TaskManagerBrowserTest, |
200 public testing::WithParamInterface<bool> { | 202 public testing::WithParamInterface<bool> { |
201 public: | 203 public: |
202 TaskManagerOOPIFBrowserTest() {} | 204 TaskManagerOOPIFBrowserTest() {} |
203 | 205 |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1242 | 1244 |
1243 // Because the subframes for tab 2 are nested, their order is deterministic. | 1245 // Because the subframes for tab 2 are nested, their order is deterministic. |
1244 EXPECT_EQ("Subframe: http://a.com/", | 1246 EXPECT_EQ("Subframe: http://a.com/", |
1245 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 1))); | 1247 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 1))); |
1246 EXPECT_EQ("Subframe: http://c.com/", | 1248 EXPECT_EQ("Subframe: http://c.com/", |
1247 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 2))); | 1249 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 2))); |
1248 EXPECT_EQ("Subframe: http://b.com/", | 1250 EXPECT_EQ("Subframe: http://b.com/", |
1249 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 3))); | 1251 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 3))); |
1250 } | 1252 } |
1251 } | 1253 } |
OLD | NEW |