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

Side by Side Diff: content/renderer/media/video_source_handler_unittest.cc

Issue 686523002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <string> 5 #include <string>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/child/child_process.h" 9 #include "content/child/child_process.h"
10 #include "content/common/media/video_capture.h" 10 #include "content/common/media/video_capture.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class VideoSourceHandlerTest : public ::testing::Test { 42 class VideoSourceHandlerTest : public ::testing::Test {
43 public: 43 public:
44 VideoSourceHandlerTest() 44 VideoSourceHandlerTest()
45 : child_process_(new ChildProcess()), 45 : child_process_(new ChildProcess()),
46 registry_(new MockMediaStreamRegistry()) { 46 registry_(new MockMediaStreamRegistry()) {
47 handler_.reset(new VideoSourceHandler(registry_.get())); 47 handler_.reset(new VideoSourceHandler(registry_.get()));
48 registry_->Init(kTestStreamUrl); 48 registry_->Init(kTestStreamUrl);
49 registry_->AddVideoTrack(kTestVideoTrackId); 49 registry_->AddVideoTrack(kTestVideoTrackId);
50 } 50 }
51 51
52 virtual void TearDown() { 52 void TearDown() override {
53 registry_.reset(); 53 registry_.reset();
54 handler_.reset(); 54 handler_.reset();
55 blink::WebHeap::collectAllGarbageForTesting(); 55 blink::WebHeap::collectAllGarbageForTesting();
56 } 56 }
57 57
58 protected: 58 protected:
59 base::MessageLoop message_loop_; 59 base::MessageLoop message_loop_;
60 scoped_ptr<ChildProcess> child_process_; 60 scoped_ptr<ChildProcess> child_process_;
61 scoped_ptr<VideoSourceHandler> handler_; 61 scoped_ptr<VideoSourceHandler> handler_;
62 scoped_ptr<MockMediaStreamRegistry> registry_; 62 scoped_ptr<MockMediaStreamRegistry> registry_;
(...skipping 29 matching lines...) Expand all
92 EXPECT_FALSE(handler_->Close(NULL)); 92 EXPECT_FALSE(handler_->Close(NULL));
93 EXPECT_TRUE(handler_->Close(&reader)); 93 EXPECT_TRUE(handler_->Close(&reader));
94 } 94 }
95 95
96 TEST_F(VideoSourceHandlerTest, OpenWithoutClose) { 96 TEST_F(VideoSourceHandlerTest, OpenWithoutClose) {
97 FakeFrameReader reader; 97 FakeFrameReader reader;
98 EXPECT_TRUE(handler_->Open(kTestStreamUrl, &reader)); 98 EXPECT_TRUE(handler_->Open(kTestStreamUrl, &reader));
99 } 99 }
100 100
101 } // namespace content 101 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698