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

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

Issue 1915793002: Remove a |readonly| member of MediaStreamTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a |readonly| argument in unittest files Created 4 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 formats.push_back(media::VideoCaptureFormat( 46 formats.push_back(media::VideoCaptureFormat(
47 gfx::Size(640, 480), 30, media::PIXEL_FORMAT_I420)); 47 gfx::Size(640, 480), 30, media::PIXEL_FORMAT_I420));
48 formats.push_back(media::VideoCaptureFormat( 48 formats.push_back(media::VideoCaptureFormat(
49 gfx::Size(352, 288), 30, media::PIXEL_FORMAT_I420)); 49 gfx::Size(352, 288), 30, media::PIXEL_FORMAT_I420));
50 formats.push_back(media::VideoCaptureFormat( 50 formats.push_back(media::VideoCaptureFormat(
51 gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420)); 51 gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420));
52 mock_source_->SetSupportedFormats(formats); 52 mock_source_->SetSupportedFormats(formats);
53 webkit_source_.initialize(base::UTF8ToUTF16("dummy_source_id"), 53 webkit_source_.initialize(base::UTF8ToUTF16("dummy_source_id"),
54 blink::WebMediaStreamSource::TypeVideo, 54 blink::WebMediaStreamSource::TypeVideo,
55 base::UTF8ToUTF16("dummy_source_name"), 55 base::UTF8ToUTF16("dummy_source_name"),
56 false /* remote */, true /* readonly */); 56 false /* remote */);
57 webkit_source_.setExtraData(mock_source_); 57 webkit_source_.setExtraData(mock_source_);
58 } 58 }
59 59
60 void TearDown() override { 60 void TearDown() override {
61 webkit_source_.reset(); 61 webkit_source_.reset();
62 blink::WebHeap::collectAllGarbageForTesting(); 62 blink::WebHeap::collectAllGarbageForTesting();
63 } 63 }
64 64
65 protected: 65 protected:
66 // Create a track that's associated with |webkit_source_|. 66 // Create a track that's associated with |webkit_source_|.
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 run_loop2.Run(); 772 run_loop2.Run();
773 773
774 EXPECT_EQ(muted_state, false); 774 EXPECT_EQ(muted_state, false);
775 EXPECT_EQ(track.source().getReadyState(), 775 EXPECT_EQ(track.source().getReadyState(),
776 blink::WebMediaStreamSource::ReadyStateLive); 776 blink::WebMediaStreamSource::ReadyStateLive);
777 777
778 sink.DisconnectFromTrack(); 778 sink.DisconnectFromTrack();
779 } 779 }
780 780
781 } // namespace content 781 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698