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

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

Issue 670683003: Standardize usage of virtual/override/final in content/renderer/ (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 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 <deque> 5 #include <deque>
6 6
7 #include "content/common/media/webrtc_identity_messages.h" 7 #include "content/common/media/webrtc_identity_messages.h"
8 #include "content/renderer/media/webrtc_identity_service.h" 8 #include "content/renderer/media/webrtc_identity_service.h"
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 namespace { 14 namespace {
15 15
16 static const char FAKE_ORIGIN[] = "http://fake.com"; 16 static const char FAKE_ORIGIN[] = "http://fake.com";
17 static const char FAKE_IDENTITY_NAME[] = "fake identity"; 17 static const char FAKE_IDENTITY_NAME[] = "fake identity";
18 static const char FAKE_COMMON_NAME[] = "fake common name"; 18 static const char FAKE_COMMON_NAME[] = "fake common name";
19 static const char FAKE_CERTIFICATE[] = "fake cert"; 19 static const char FAKE_CERTIFICATE[] = "fake cert";
20 static const char FAKE_PRIVATE_KEY[] = "fake private key"; 20 static const char FAKE_PRIVATE_KEY[] = "fake private key";
21 static const int FAKE_ERROR = 100; 21 static const int FAKE_ERROR = 100;
22 22
23 class WebRTCIdentityServiceForTest : public WebRTCIdentityService { 23 class WebRTCIdentityServiceForTest : public WebRTCIdentityService {
24 public: 24 public:
25 virtual bool Send(IPC::Message* message) override { 25 bool Send(IPC::Message* message) override {
26 messages_.push_back(*message); 26 messages_.push_back(*message);
27 delete message; 27 delete message;
28 return true; 28 return true;
29 } 29 }
30 30
31 virtual bool OnControlMessageReceived(const IPC::Message& message) override { 31 bool OnControlMessageReceived(const IPC::Message& message) override {
32 return WebRTCIdentityService::OnControlMessageReceived(message); 32 return WebRTCIdentityService::OnControlMessageReceived(message);
33 } 33 }
34 34
35 IPC::Message GetLastMessage() { return messages_.back(); } 35 IPC::Message GetLastMessage() { return messages_.back(); }
36 36
37 int GetNumberOfMessages() { return messages_.size(); } 37 int GetNumberOfMessages() { return messages_.size(); }
38 38
39 void ClearMessages() { messages_.clear(); } 39 void ClearMessages() { messages_.clear(); }
40 40
41 private: 41 private:
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 EXPECT_NE(FAKE_CERTIFICATE, last_certificate_); 220 EXPECT_NE(FAKE_CERTIFICATE, last_certificate_);
221 EXPECT_NE(FAKE_PRIVATE_KEY, last_private_key_); 221 EXPECT_NE(FAKE_PRIVATE_KEY, last_private_key_);
222 222
223 service_->OnControlMessageReceived( 223 service_->OnControlMessageReceived(
224 WebRTCIdentityHostMsg_RequestFailed(id1, FAKE_ERROR)); 224 WebRTCIdentityHostMsg_RequestFailed(id1, FAKE_ERROR));
225 EXPECT_NE(FAKE_ERROR, last_error_); 225 EXPECT_NE(FAKE_ERROR, last_error_);
226 } 226 }
227 227
228 } // namespace content 228 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_identity_service.h ('k') | content/renderer/media/webrtc_local_audio_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698