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

Side by Side Diff: content/browser/media/webrtc_internals_unittest.cc

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "content/browser/media/webrtc_internals.h" 8 #include "content/browser/media/webrtc_internals.h"
9 #include "content/browser/media/webrtc_internals_ui_observer.h" 9 #include "content/browser/media/webrtc_internals_ui_observer.h"
10 #include "content/public/test/test_browser_thread.h" 10 #include "content/public/test/test_browser_thread.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 namespace { 15 namespace {
16 16
17 static const std::string kContraints = "c"; 17 static const std::string kContraints = "c";
18 static const std::string kRtcConfiguration = "r"; 18 static const std::string kRtcConfiguration = "r";
19 static const std::string kUrl = "u"; 19 static const std::string kUrl = "u";
20 20
21 class MockWebRTCInternalsProxy : public WebRTCInternalsUIObserver { 21 class MockWebRTCInternalsProxy : public WebRTCInternalsUIObserver {
22 public: 22 public:
23 virtual void OnUpdate(const std::string& command, 23 void OnUpdate(const std::string& command, const base::Value* value) override {
24 const base::Value* value) override {
25 command_ = command; 24 command_ = command;
26 if (value) 25 if (value)
27 value_.reset(value->DeepCopy()); 26 value_.reset(value->DeepCopy());
28 } 27 }
29 28
30 std::string command() { 29 std::string command() {
31 return command_; 30 return command_;
32 } 31 }
33 32
34 base::Value* value() { 33 base::Value* value() {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 279
281 TEST_F(WebRTCInternalsTest, AecRecordingFileSelectionCanceled) { 280 TEST_F(WebRTCInternalsTest, AecRecordingFileSelectionCanceled) {
282 scoped_ptr<MockWebRTCInternalsProxy> observer(new MockWebRTCInternalsProxy()); 281 scoped_ptr<MockWebRTCInternalsProxy> observer(new MockWebRTCInternalsProxy());
283 WebRTCInternals::GetInstance()->AddObserver(observer.get()); 282 WebRTCInternals::GetInstance()->AddObserver(observer.get());
284 WebRTCInternals::GetInstance()->FileSelectionCanceled(NULL); 283 WebRTCInternals::GetInstance()->FileSelectionCanceled(NULL);
285 EXPECT_EQ("aecRecordingFileSelectionCancelled", observer->command()); 284 EXPECT_EQ("aecRecordingFileSelectionCancelled", observer->command());
286 EXPECT_EQ(NULL, observer->value()); 285 EXPECT_EQ(NULL, observer->value());
287 } 286 }
288 287
289 } // namespace content 288 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_internals_message_handler.h ('k') | content/browser/message_port_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698