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

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

Issue 2406703002: tracing: remove sampling state profiler (Closed)
Patch Set: . Created 4 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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Automatically grant device permission. 86 // Automatically grant device permission.
87 AppendUseFakeUIForMediaStreamFlag(); 87 AppendUseFakeUIForMediaStreamFlag();
88 } 88 }
89 ~WebRtcGetUserMediaBrowserTest() override {} 89 ~WebRtcGetUserMediaBrowserTest() override {}
90 90
91 void StartTracing() { 91 void StartTracing() {
92 CHECK(trace_log_ == NULL) << "Can only can start tracing once"; 92 CHECK(trace_log_ == NULL) << "Can only can start tracing once";
93 trace_log_ = base::trace_event::TraceLog::GetInstance(); 93 trace_log_ = base::trace_event::TraceLog::GetInstance();
94 base::trace_event::TraceConfig trace_config( 94 base::trace_event::TraceConfig trace_config(
95 "video", base::trace_event::RECORD_UNTIL_FULL); 95 "video", base::trace_event::RECORD_UNTIL_FULL);
96 trace_config.EnableSampling();
97 trace_log_->SetEnabled(trace_config, 96 trace_log_->SetEnabled(trace_config,
98 base::trace_event::TraceLog::RECORDING_MODE); 97 base::trace_event::TraceLog::RECORDING_MODE);
99 // Check that we are indeed recording. 98 // Check that we are indeed recording.
100 EXPECT_EQ(trace_log_->GetNumTracesRecorded(), 1); 99 EXPECT_EQ(trace_log_->GetNumTracesRecorded(), 1);
101 } 100 }
102 101
103 void StopTracing() { 102 void StopTracing() {
104 CHECK(message_loop_runner_.get() == NULL) 103 CHECK(message_loop_runner_.get() == NULL)
105 << "Calling StopTracing more than once"; 104 << "Calling StopTracing more than once";
106 105
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 717
719 std::string call = 718 std::string call =
720 GenerateGetUserMediaWithMandatorySourceID( 719 GenerateGetUserMediaWithMandatorySourceID(
721 "getUserMediaInIframeAndCloseInFailureCb", "invalid", "invalid"); 720 "getUserMediaInIframeAndCloseInFailureCb", "invalid", "invalid");
722 NavigateToURL(shell(), url); 721 NavigateToURL(shell(), url);
723 722
724 ExecuteJavascriptAndWaitForOk(call); 723 ExecuteJavascriptAndWaitForOk(call);
725 } 724 }
726 725
727 } // namespace content 726 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_ui.cc ('k') | third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698