| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 switches::kProxyPacUrl, | 175 switches::kProxyPacUrl, |
| 175 "data:,function FindProxyForURL(url, host){return \"DIRECT;\";}"); | 176 "data:,function FindProxyForURL(url, host){return \"DIRECT;\";}"); |
| 176 } | 177 } |
| 177 | 178 |
| 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() { |
| 186 scoped_feature_list_.InitAndEnableFeature(features::kMemoryCoordinator); |
| 187 } |
| 188 |
| 185 ~TaskManagerMemoryCoordinatorBrowserTest() override {} | 189 ~TaskManagerMemoryCoordinatorBrowserTest() override {} |
| 186 | 190 |
| 187 protected: | |
| 188 void SetUpCommandLine(base::CommandLine* command_line) override { | |
| 189 command_line->AppendSwitchASCII(switches::kEnableFeatures, | |
| 190 features::kMemoryCoordinator.name); | |
| 191 } | |
| 192 | |
| 193 private: | 191 private: |
| 192 base::test::ScopedFeatureList scoped_feature_list_; |
| 194 DISALLOW_COPY_AND_ASSIGN(TaskManagerMemoryCoordinatorBrowserTest); | 193 DISALLOW_COPY_AND_ASSIGN(TaskManagerMemoryCoordinatorBrowserTest); |
| 195 }; | 194 }; |
| 196 | 195 |
| 197 // Parameterized variant of TaskManagerBrowserTest which runs with/without | 196 // Parameterized variant of TaskManagerBrowserTest which runs with/without |
| 198 // --site-per-process, which enables out of process iframes (OOPIFs). | 197 // --site-per-process, which enables out of process iframes (OOPIFs). |
| 199 class TaskManagerOOPIFBrowserTest : public TaskManagerBrowserTest, | 198 class TaskManagerOOPIFBrowserTest : public TaskManagerBrowserTest, |
| 200 public testing::WithParamInterface<bool> { | 199 public testing::WithParamInterface<bool> { |
| 201 public: | 200 public: |
| 202 TaskManagerOOPIFBrowserTest() {} | 201 TaskManagerOOPIFBrowserTest() {} |
| 203 | 202 |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1242 | 1241 |
| 1243 // Because the subframes for tab 2 are nested, their order is deterministic. | 1242 // Because the subframes for tab 2 are nested, their order is deterministic. |
| 1244 EXPECT_EQ("Subframe: http://a.com/", | 1243 EXPECT_EQ("Subframe: http://a.com/", |
| 1245 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 1))); | 1244 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 1))); |
| 1246 EXPECT_EQ("Subframe: http://c.com/", | 1245 EXPECT_EQ("Subframe: http://c.com/", |
| 1247 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 2))); | 1246 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 2))); |
| 1248 EXPECT_EQ("Subframe: http://b.com/", | 1247 EXPECT_EQ("Subframe: http://b.com/", |
| 1249 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 3))); | 1248 base::UTF16ToUTF8(model()->GetRowTitle(tab2_start + 3))); |
| 1250 } | 1249 } |
| 1251 } | 1250 } |
| OLD | NEW |