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

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

Issue 506903003: Remove implicit conversions from scoped_refptr to T* in content/browser/media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « content/browser/media/capture/desktop_capture_device_aura.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/debug/trace_event_impl.h" 6 #include "base/debug/trace_event_impl.h"
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/test/trace_event_analyzer.h" 9 #include "base/test/trace_event_analyzer.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 base::debug::TraceOptions trace_options(base::debug::RECORD_UNTIL_FULL); 86 base::debug::TraceOptions trace_options(base::debug::RECORD_UNTIL_FULL);
87 trace_options.enable_sampling = true; 87 trace_options.enable_sampling = true;
88 trace_log_->SetEnabled(base::debug::CategoryFilter("video"), 88 trace_log_->SetEnabled(base::debug::CategoryFilter("video"),
89 base::debug::TraceLog::RECORDING_MODE, 89 base::debug::TraceLog::RECORDING_MODE,
90 trace_options); 90 trace_options);
91 // Check that we are indeed recording. 91 // Check that we are indeed recording.
92 EXPECT_EQ(trace_log_->GetNumTracesRecorded(), 1); 92 EXPECT_EQ(trace_log_->GetNumTracesRecorded(), 1);
93 } 93 }
94 94
95 void StopTracing() { 95 void StopTracing() {
96 CHECK(message_loop_runner_ == NULL) << "Calling StopTracing more than once"; 96 CHECK(message_loop_runner_.get() == NULL)
97 << "Calling StopTracing more than once";
97 trace_log_->SetDisabled(); 98 trace_log_->SetDisabled();
98 message_loop_runner_ = new MessageLoopRunner; 99 message_loop_runner_ = new MessageLoopRunner;
99 trace_log_->Flush(base::Bind( 100 trace_log_->Flush(base::Bind(
100 &WebRtcGetUserMediaBrowserTest::OnTraceDataCollected, 101 &WebRtcGetUserMediaBrowserTest::OnTraceDataCollected,
101 base::Unretained(this))); 102 base::Unretained(this)));
102 message_loop_runner_->Run(); 103 message_loop_runner_->Run();
103 } 104 }
104 105
105 void OnTraceDataCollected( 106 void OnTraceDataCollected(
106 const scoped_refptr<base::RefCountedString>& events_str_ptr, 107 const scoped_refptr<base::RefCountedString>& events_str_ptr,
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 {640, 640, 360, 360, 10, 30}, 614 {640, 640, 360, 360, 10, 30},
614 {640, 640, 480, 480, 10, 30}, 615 {640, 640, 480, 480, 10, 30},
615 {960, 960, 720, 720, 10, 30}, 616 {960, 960, 720, 720, 10, 30},
616 {1280, 1280, 720, 720, 10, 30}}; 617 {1280, 1280, 720, 720, 10, 30}};
617 618
618 INSTANTIATE_TEST_CASE_P(UserMedia, 619 INSTANTIATE_TEST_CASE_P(UserMedia,
619 WebRtcConstraintsBrowserTest, 620 WebRtcConstraintsBrowserTest,
620 testing::ValuesIn(kAllUserMediaSizes)); 621 testing::ValuesIn(kAllUserMediaSizes));
621 622
622 } // namespace content 623 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/capture/desktop_capture_device_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698