| 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 "chrome/browser/media/webrtc/tab_desktop_media_list.h" | 5 #include "chrome/browser/media/webrtc/tab_desktop_media_list.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 #endif | 164 #endif |
| 165 | 165 |
| 166 // Create profile. | 166 // Create profile. |
| 167 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 167 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 168 ASSERT_TRUE(profile_manager); | 168 ASSERT_TRUE(profile_manager); |
| 169 | 169 |
| 170 profile_ = profile_manager->GetLastUsedProfileAllowedByPolicy(); | 170 profile_ = profile_manager->GetLastUsedProfileAllowedByPolicy(); |
| 171 ASSERT_TRUE(profile_); | 171 ASSERT_TRUE(profile_); |
| 172 | 172 |
| 173 // Create browser. | 173 // Create browser. |
| 174 Browser::CreateParams profile_params(profile_); | 174 Browser::CreateParams profile_params(profile_, true); |
| 175 browser_ = chrome::CreateBrowserWithTestWindowForParams(&profile_params); | 175 browser_ = chrome::CreateBrowserWithTestWindowForParams(&profile_params); |
| 176 ASSERT_TRUE(browser_); | 176 ASSERT_TRUE(browser_); |
| 177 for (int i = 0; i < kDefaultSourceCount; i++) { | 177 for (int i = 0; i < kDefaultSourceCount; i++) { |
| 178 AddWebcontents(i + 1); | 178 AddWebcontents(i + 1); |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 void TearDown() override { | 182 void TearDown() override { |
| 183 for (auto& contents : contents_array_) | 183 for (auto& contents : contents_array_) |
| 184 contents.reset(); | 184 contents.reset(); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 favicon_info.image = CreateGrayscaleImage(gfx::Size(10, 10), 100); | 353 favicon_info.image = CreateGrayscaleImage(gfx::Size(10, 10), 100); |
| 354 contents->GetController().GetTransientEntry()->GetFavicon() = favicon_info; | 354 contents->GetController().GetTransientEntry()->GetFavicon() = favicon_info; |
| 355 | 355 |
| 356 EXPECT_CALL(observer_, OnSourceThumbnailChanged(list_.get(), 0)) | 356 EXPECT_CALL(observer_, OnSourceThumbnailChanged(list_.get(), 0)) |
| 357 .WillOnce(QuitMessageLoop()); | 357 .WillOnce(QuitMessageLoop()); |
| 358 | 358 |
| 359 base::RunLoop().Run(); | 359 base::RunLoop().Run(); |
| 360 | 360 |
| 361 list_.reset(); | 361 list_.reset(); |
| 362 } | 362 } |
| OLD | NEW |