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

Side by Side Diff: content/renderer/media/render_media_log_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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/test/simple_test_tick_clock.h" 5 #include "base/test/simple_test_tick_clock.h"
6 #include "content/common/view_messages.h" 6 #include "content/common/view_messages.h"
7 #include "content/public/test/mock_render_thread.h" 7 #include "content/public/test/mock_render_thread.h"
8 #include "content/renderer/media/render_media_log.h" 8 #include "content/renderer/media/render_media_log.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class RenderMediaLogTest : public testing::Test { 13 class RenderMediaLogTest : public testing::Test {
14 public: 14 public:
15 RenderMediaLogTest() 15 RenderMediaLogTest()
16 : log_(new RenderMediaLog()), 16 : log_(new RenderMediaLog()),
17 tick_clock_(new base::SimpleTestTickClock()) { 17 tick_clock_(new base::SimpleTestTickClock()) {
18 log_->SetTickClockForTesting(scoped_ptr<base::TickClock>(tick_clock_)); 18 log_->SetTickClockForTesting(scoped_ptr<base::TickClock>(tick_clock_));
19 } 19 }
20 20
21 virtual ~RenderMediaLogTest() {} 21 ~RenderMediaLogTest() override {}
22 22
23 void AddEvent(media::MediaLogEvent::Type type) { 23 void AddEvent(media::MediaLogEvent::Type type) {
24 log_->AddEvent(log_->CreateEvent(type)); 24 log_->AddEvent(log_->CreateEvent(type));
25 } 25 }
26 26
27 void Advance(base::TimeDelta delta) { tick_clock_->Advance(delta); } 27 void Advance(base::TimeDelta delta) { tick_clock_->Advance(delta); }
28 28
29 int message_count() { return render_thread_.sink().message_count(); } 29 int message_count() { return render_thread_.sink().message_count(); }
30 30
31 std::vector<media::MediaLogEvent> GetMediaLogEvents() { 31 std::vector<media::MediaLogEvent> GetMediaLogEvents() {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // event. 95 // event.
96 std::vector<media::MediaLogEvent> events = GetMediaLogEvents(); 96 std::vector<media::MediaLogEvent> events = GetMediaLogEvents();
97 ASSERT_EQ(4u, events.size()); 97 ASSERT_EQ(4u, events.size());
98 EXPECT_EQ(media::MediaLogEvent::LOAD, events[0].type); 98 EXPECT_EQ(media::MediaLogEvent::LOAD, events[0].type);
99 EXPECT_EQ(media::MediaLogEvent::SEEK, events[1].type); 99 EXPECT_EQ(media::MediaLogEvent::SEEK, events[1].type);
100 EXPECT_EQ(media::MediaLogEvent::PLAY, events[2].type); 100 EXPECT_EQ(media::MediaLogEvent::PLAY, events[2].type);
101 EXPECT_EQ(media::MediaLogEvent::BUFFERED_EXTENTS_CHANGED, events[3].type); 101 EXPECT_EQ(media::MediaLogEvent::BUFFERED_EXTENTS_CHANGED, events[3].type);
102 } 102 }
103 103
104 } // namespace content 104 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698