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

Side by Side Diff: chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc

Issue 1031813002: Use proper tracing category in image/tab capture trace logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reuploaded patchset! Created 5 years, 8 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 | content/browser/media/capture/content_video_capture_device_core.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/test/trace_event_analyzer.h" 8 #include "base/test/trace_event_analyzer.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 void RunTest(const std::string& test_name) { 175 void RunTest(const std::string& test_name) {
176 if (HasFlag(kUseGpu) && !IsGpuAvailable()) { 176 if (HasFlag(kUseGpu) && !IsGpuAvailable()) {
177 LOG(WARNING) << 177 LOG(WARNING) <<
178 "Test skipped: requires gpu. Pass --enable-gpu on the command " 178 "Test skipped: requires gpu. Pass --enable-gpu on the command "
179 "line if use of GPU is desired."; 179 "line if use of GPU is desired.";
180 return; 180 return;
181 } 181 }
182 182
183 std::string json_events; 183 std::string json_events;
184 ASSERT_TRUE(tracing::BeginTracing("gpu,mirroring")); 184 ASSERT_TRUE(tracing::BeginTracing("gpu,gpu.capture"));
185 std::string page = "performance.html"; 185 std::string page = "performance.html";
186 page += HasFlag(kTestThroughWebRTC) ? "?WebRTC=1" : "?WebRTC=0"; 186 page += HasFlag(kTestThroughWebRTC) ? "?WebRTC=1" : "?WebRTC=0";
187 // Ideally we'd like to run a higher capture rate when vsync is disabled, 187 // Ideally we'd like to run a higher capture rate when vsync is disabled,
188 // but libjingle currently doesn't allow that. 188 // but libjingle currently doesn't allow that.
189 // page += HasFlag(kDisableVsync) ? "&fps=300" : "&fps=30"; 189 // page += HasFlag(kDisableVsync) ? "&fps=300" : "&fps=30";
190 page += "&fps=30"; 190 page += "&fps=30";
191 ASSERT_TRUE(RunExtensionSubtest("tab_capture", page)) << message_; 191 ASSERT_TRUE(RunExtensionSubtest("tab_capture", page)) << message_;
192 ASSERT_TRUE(tracing::EndTracing(&json_events)); 192 ASSERT_TRUE(tracing::EndTracing(&json_events));
193 scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer; 193 scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer;
194 analyzer.reset(trace_analyzer::TraceAnalyzer::Create(json_events)); 194 analyzer.reset(trace_analyzer::TraceAnalyzer::Create(json_events));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 TabCapturePerformanceTest, 247 TabCapturePerformanceTest,
248 testing::Values( 248 testing::Values(
249 kScalingTestBase | kScaleQualityFast, 249 kScalingTestBase | kScaleQualityFast,
250 kScalingTestBase | kScaleQualityGood, 250 kScalingTestBase | kScaleQualityGood,
251 kScalingTestBase | kScaleQualityBest, 251 kScalingTestBase | kScaleQualityBest,
252 kScalingTestBase | kScaleQualityFast | kSmallWindow, 252 kScalingTestBase | kScaleQualityFast | kSmallWindow,
253 kScalingTestBase | kScaleQualityGood | kSmallWindow, 253 kScalingTestBase | kScaleQualityGood | kSmallWindow,
254 kScalingTestBase | kScaleQualityBest | kSmallWindow)); 254 kScalingTestBase | kScaleQualityBest | kSmallWindow));
255 255
256 #endif // USE_AURA 256 #endif // USE_AURA
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/capture/content_video_capture_device_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698