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

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

Issue 1540303003: MediaRecorder: update to spec (3/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverted DEPS to master Created 4 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/run_loop.h" 5 #include "base/run_loop.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/child/child_process.h" 7 #include "content/child/child_process.h"
8 #include "content/renderer/media/media_recorder_handler.h" 8 #include "content/renderer/media/media_recorder_handler.h"
9 #include "content/renderer/media/mock_media_stream_registry.h" 9 #include "content/renderer/media/mock_media_stream_registry.h"
10 #include "media/audio/simple_sources.h" 10 #include "media/audio/simple_sources.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 registry_.Init(kTestStreamUrl); 71 registry_.Init(kTestStreamUrl);
72 } 72 }
73 73
74 ~MediaRecorderHandlerTest() { 74 ~MediaRecorderHandlerTest() {
75 registry_.reset(); 75 registry_.reset();
76 blink::WebHeap::collectAllGarbageForTesting(); 76 blink::WebHeap::collectAllGarbageForTesting();
77 } 77 }
78 78
79 MOCK_METHOD3(writeData, void(const char*, size_t, bool)); 79 MOCK_METHOD3(writeData, void(const char*, size_t, bool));
80 MOCK_METHOD1(failOutOfMemory, void(const WebString& message)); 80 MOCK_METHOD1(onError, void(const WebString& message));
81 MOCK_METHOD1(failIllegalStreamModification, void(const WebString& message));
82 MOCK_METHOD1(failOtherRecordingError, void(const WebString& message));
83 81
84 bool recording() const { return media_recorder_handler_->recording_; } 82 bool recording() const { return media_recorder_handler_->recording_; }
85 bool hasVideoRecorders() const { 83 bool hasVideoRecorders() const {
86 return !media_recorder_handler_->video_recorders_.empty(); 84 return !media_recorder_handler_->video_recorders_.empty();
87 } 85 }
88 bool hasAudioRecorders() const { 86 bool hasAudioRecorders() const {
89 return !media_recorder_handler_->audio_recorders_.empty(); 87 return !media_recorder_handler_->audio_recorders_.empty();
90 } 88 }
91 89
92 void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame) { 90 void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame) {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 319 }
322 320
323 media_recorder_handler_->stop(); 321 media_recorder_handler_->stop();
324 322
325 // Expect a last call on destruction, with size 0 and |lastInSlice| true. 323 // Expect a last call on destruction, with size 0 and |lastInSlice| true.
326 EXPECT_CALL(*this, writeData(nullptr, 0, true)).Times(1); 324 EXPECT_CALL(*this, writeData(nullptr, 0, true)).Times(1);
327 media_recorder_handler_.reset(); 325 media_recorder_handler_.reset();
328 } 326 }
329 327
330 } // namespace content 328 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698