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

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

Issue 2425703002: Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Fixed webkit_tests Created 3 years, 9 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 gfx::Size(1280, 720), 30, media::PIXEL_FORMAT_I420)); 45 gfx::Size(1280, 720), 30, media::PIXEL_FORMAT_I420));
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(blink::WebString::fromASCII("dummy_source_id"), 53 webkit_source_.initialize(blink::WebString::fromASCII("dummy_source_id"),
54 blink::WebMediaStreamSource::TypeVideo, 54 blink::WebMediaStreamSource::TypeVideo,
55 blink::WebString::fromASCII("dummy_source_name"), 55 blink::WebString::fromASCII("dummy_source_name"));
56 false /* remote */);
57 webkit_source_.setExtraData(mock_source_); 56 webkit_source_.setExtraData(mock_source_);
58 } 57 }
59 58
60 void TearDown() override { 59 void TearDown() override {
61 webkit_source_.reset(); 60 webkit_source_.reset();
62 blink::WebHeap::collectAllGarbageForTesting(); 61 blink::WebHeap::collectAllGarbageForTesting();
63 } 62 }
64 63
65 protected: 64 protected:
66 // Create a track that's associated with |webkit_source_|. 65 // Create a track that's associated with |webkit_source_|.
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 TEST_F(MediaStreamVideoSourceTest, InvalidMandatoryAspectRatioFails) { 795 TEST_F(MediaStreamVideoSourceTest, InvalidMandatoryAspectRatioFails) {
797 MockConstraintFactory factory; 796 MockConstraintFactory factory;
798 factory.basic().aspectRatio.setMax(0.0); 797 factory.basic().aspectRatio.setMax(0.0);
799 blink::WebMediaStreamTrack track = 798 blink::WebMediaStreamTrack track =
800 CreateTrack("123", factory.CreateWebMediaConstraints()); 799 CreateTrack("123", factory.CreateWebMediaConstraints());
801 mock_source()->CompleteGetSupportedFormats(); 800 mock_source()->CompleteGetSupportedFormats();
802 EXPECT_EQ(1, NumberOfFailedConstraintsCallbacks()); 801 EXPECT_EQ(1, NumberOfFailedConstraintsCallbacks());
803 } 802 }
804 803
805 } // namespace content 804 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698