Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: chrome/browser/media/webrtc/desktop_media_list_ash_unittest.cc

Issue 2493223002: Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink (Closed)
Patch Set: Override DesktopMediaListAshTest::TearDown() to reset list_ Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | components/exo/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/desktop_media_list_ash.h" 5 #include "chrome/browser/media/webrtc/desktop_media_list_ash.h"
6 6
7 #include "ash/test/ash_test_base.h" 7 #include "ash/test/ash_test_base.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 20 matching lines...) Expand all
31 MOCK_METHOD2(OnSourceNameChanged, void(DesktopMediaList* list, int index)); 31 MOCK_METHOD2(OnSourceNameChanged, void(DesktopMediaList* list, int index));
32 MOCK_METHOD2(OnSourceThumbnailChanged, 32 MOCK_METHOD2(OnSourceThumbnailChanged,
33 void(DesktopMediaList* list, int index)); 33 void(DesktopMediaList* list, int index));
34 }; 34 };
35 35
36 class DesktopMediaListAshTest : public ash::test::AshTestBase { 36 class DesktopMediaListAshTest : public ash::test::AshTestBase {
37 public: 37 public:
38 DesktopMediaListAshTest() {} 38 DesktopMediaListAshTest() {}
39 ~DesktopMediaListAshTest() override {} 39 ~DesktopMediaListAshTest() override {}
40 40
41 void TearDown() override {
42 // Reset the unique_ptr so the list stops refreshing.
43 list_.reset();
44 ash::test::AshTestBase::TearDown();
45 }
46
41 void CreateList(int source_types) { 47 void CreateList(int source_types) {
42 list_.reset(new DesktopMediaListAsh(source_types)); 48 list_.reset(new DesktopMediaListAsh(source_types));
43 list_->SetThumbnailSize(gfx::Size(kThumbnailSize, kThumbnailSize)); 49 list_->SetThumbnailSize(gfx::Size(kThumbnailSize, kThumbnailSize));
44 50
45 // Set update period to reduce the time it takes to run tests. 51 // Set update period to reduce the time it takes to run tests.
46 list_->SetUpdatePeriod(base::TimeDelta::FromMilliseconds(1)); 52 list_->SetUpdatePeriod(base::TimeDelta::FromMilliseconds(1));
47 } 53 }
48 54
49 protected: 55 protected:
50 MockDesktopMediaListObserver observer_; 56 MockDesktopMediaListObserver observer_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 .WillOnce(QuitMessageLoop()) 119 .WillOnce(QuitMessageLoop())
114 .WillRepeatedly(DoDefault()); 120 .WillRepeatedly(DoDefault());
115 EXPECT_CALL(observer_, OnSourceRemoved(list_.get(), 0)) 121 EXPECT_CALL(observer_, OnSourceRemoved(list_.get(), 0))
116 .WillOnce(QuitMessageLoop()); 122 .WillOnce(QuitMessageLoop());
117 123
118 list_->StartUpdating(&observer_); 124 list_->StartUpdating(&observer_);
119 base::RunLoop().Run(); 125 base::RunLoop().Run();
120 window.reset(); 126 window.reset();
121 base::RunLoop().Run(); 127 base::RunLoop().Run();
122 } 128 }
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | components/exo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698