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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 contents_array_.push_back(std::move(contents)); | 149 contents_array_.push_back(std::move(contents)); |
150 tab_strip_model->AppendWebContents(contents_array_.back().get(), false); | 150 tab_strip_model->AppendWebContents(contents_array_.back().get(), false); |
151 } | 151 } |
152 | 152 |
153 void SetUp() override { | 153 void SetUp() override { |
154 rvh_test_enabler_.reset(new content::RenderViewHostTestEnabler()); | 154 rvh_test_enabler_.reset(new content::RenderViewHostTestEnabler()); |
155 // Create a new temporary directory, and store the path. | 155 // Create a new temporary directory, and store the path. |
156 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 156 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
157 TestingBrowserProcess::GetGlobal()->SetProfileManager( | 157 TestingBrowserProcess::GetGlobal()->SetProfileManager( |
158 new UnittestProfileManager(temp_dir_.path())); | 158 new UnittestProfileManager(temp_dir_.GetPath())); |
159 | 159 |
160 #if defined(OS_CHROMEOS) | 160 #if defined(OS_CHROMEOS) |
161 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); | 161 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); |
162 cl->AppendSwitch(switches::kTestType); | 162 cl->AppendSwitch(switches::kTestType); |
163 chromeos::WallpaperManager::Initialize(); | 163 chromeos::WallpaperManager::Initialize(); |
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); |
(...skipping 184 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 |