| OLD | NEW |
| 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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/test/scoped_feature_list.h" | 8 #include "base/test/scoped_feature_list.h" |
| 9 #include "chrome/browser/task_manager/mock_web_contents_task_manager.h" | 9 #include "chrome/browser/task_manager/mock_web_contents_task_manager.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } // namespace | 51 } // namespace |
| 52 | 52 |
| 53 // A test for OOPIFs and how they show up in the task manager as | 53 // A test for OOPIFs and how they show up in the task manager as |
| 54 // SubframeTasks. | 54 // SubframeTasks. |
| 55 class SubframeTaskBrowserTest : public InProcessBrowserTest { | 55 class SubframeTaskBrowserTest : public InProcessBrowserTest { |
| 56 public: | 56 public: |
| 57 SubframeTaskBrowserTest() {} | 57 SubframeTaskBrowserTest() {} |
| 58 ~SubframeTaskBrowserTest() override {} | 58 ~SubframeTaskBrowserTest() override {} |
| 59 | 59 |
| 60 void SetUpCommandLine(base::CommandLine* command_line) override { | 60 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 61 InProcessBrowserTest::SetUpCommandLine(command_line); | |
| 62 content::IsolateAllSitesForTesting(command_line); | 61 content::IsolateAllSitesForTesting(command_line); |
| 63 } | 62 } |
| 64 | 63 |
| 65 void SetUpOnMainThread() override { | 64 void SetUpOnMainThread() override { |
| 66 host_resolver()->AddRule("*", "127.0.0.1"); | 65 host_resolver()->AddRule("*", "127.0.0.1"); |
| 67 ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); | 66 ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); |
| 68 content::SetupCrossSiteRedirector(embedded_test_server()); | 67 content::SetupCrossSiteRedirector(embedded_test_server()); |
| 69 embedded_test_server()->StartAcceptingConnections(); | 68 embedded_test_server()->StartAcceptingConnections(); |
| 70 } | 69 } |
| 71 | 70 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 base::UTF8ToUTF16(new_title)); | 265 base::UTF8ToUTF16(new_title)); |
| 267 EXPECT_TRUE(ExecuteScript(web_contents, script)); | 266 EXPECT_TRUE(ExecuteScript(web_contents, script)); |
| 268 base::string16 actual_title = title_watcher.WaitAndGetTitle(); | 267 base::string16 actual_title = title_watcher.WaitAndGetTitle(); |
| 269 EXPECT_EQ(new_title, base::UTF16ToUTF8(actual_title)); | 268 EXPECT_EQ(new_title, base::UTF16ToUTF8(actual_title)); |
| 270 | 269 |
| 271 EXPECT_EQ(PrefixExpectedTabTitle(new_title), main_task->title()); | 270 EXPECT_EQ(PrefixExpectedTabTitle(new_title), main_task->title()); |
| 272 EXPECT_EQ(PrefixExpectedTDIRowTitle(new_title), tdi_task->title()); | 271 EXPECT_EQ(PrefixExpectedTDIRowTitle(new_title), tdi_task->title()); |
| 273 } | 272 } |
| 274 | 273 |
| 275 } // namespace task_manager | 274 } // namespace task_manager |
| OLD | NEW |