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

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

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 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
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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "base/test/trace_event_analyzer.h" 7 #include "base/test/trace_event_analyzer.h"
8 #include "base/win/windows_version.h" 8 #include "base/win/windows_version.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 std::string json_events; 153 std::string json_events;
154 ASSERT_TRUE(tracing::BeginTracing("gpu,gpu.capture")); 154 ASSERT_TRUE(tracing::BeginTracing("gpu,gpu.capture"));
155 std::string page = "performance.html"; 155 std::string page = "performance.html";
156 page += HasFlag(kTestThroughWebRTC) ? "?WebRTC=1" : "?WebRTC=0"; 156 page += HasFlag(kTestThroughWebRTC) ? "?WebRTC=1" : "?WebRTC=0";
157 // Ideally we'd like to run a higher capture rate when vsync is disabled, 157 // Ideally we'd like to run a higher capture rate when vsync is disabled,
158 // but libjingle currently doesn't allow that. 158 // but libjingle currently doesn't allow that.
159 // page += HasFlag(kDisableVsync) ? "&fps=300" : "&fps=30"; 159 // page += HasFlag(kDisableVsync) ? "&fps=300" : "&fps=30";
160 page += "&fps=60"; 160 page += "&fps=60";
161 ASSERT_TRUE(RunExtensionSubtest("tab_capture", page)) << message_; 161 ASSERT_TRUE(RunExtensionSubtest("tab_capture", page)) << message_;
162 ASSERT_TRUE(tracing::EndTracing(&json_events)); 162 ASSERT_TRUE(tracing::EndTracing(&json_events));
163 scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer; 163 std::unique_ptr<trace_analyzer::TraceAnalyzer> analyzer;
164 analyzer.reset(trace_analyzer::TraceAnalyzer::Create(json_events)); 164 analyzer.reset(trace_analyzer::TraceAnalyzer::Create(json_events));
165 165
166 // The printed result will be the average time between frames in the 166 // The printed result will be the average time between frames in the
167 // browser window. 167 // browser window.
168 bool gpu_frames = PrintResults( 168 bool gpu_frames = PrintResults(
169 analyzer.get(), 169 analyzer.get(),
170 test_name, 170 test_name,
171 "RenderWidget::DidCommitAndDrawCompositorFrame", 171 "RenderWidget::DidCommitAndDrawCompositorFrame",
172 "ms"); 172 "ms");
173 EXPECT_TRUE(gpu_frames); 173 EXPECT_TRUE(gpu_frames);
(...skipping 30 matching lines...) Expand all
204 testing::Values( 204 testing::Values(
205 0, 205 0,
206 kUseGpu | kForceGpuComposited, 206 kUseGpu | kForceGpuComposited,
207 kDisableVsync, 207 kDisableVsync,
208 kDisableVsync | kUseGpu | kForceGpuComposited, 208 kDisableVsync | kUseGpu | kForceGpuComposited,
209 kTestThroughWebRTC, 209 kTestThroughWebRTC,
210 kTestThroughWebRTC | kUseGpu | kForceGpuComposited, 210 kTestThroughWebRTC | kUseGpu | kForceGpuComposited,
211 kTestThroughWebRTC | kDisableVsync, 211 kTestThroughWebRTC | kDisableVsync,
212 kTestThroughWebRTC | kDisableVsync | kUseGpu | kForceGpuComposited)); 212 kTestThroughWebRTC | kDisableVsync | kUseGpu | kForceGpuComposited));
213 213
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698