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

Side by Side Diff: chrome/browser/devtools/devtools_sanity_browsertest.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 class PushTimesMockURLRequestJob : public net::URLRequestMockHTTPJob { 193 class PushTimesMockURLRequestJob : public net::URLRequestMockHTTPJob {
194 public: 194 public:
195 PushTimesMockURLRequestJob(net::URLRequest* request, 195 PushTimesMockURLRequestJob(net::URLRequest* request,
196 net::NetworkDelegate* network_delegate, 196 net::NetworkDelegate* network_delegate,
197 base::FilePath file_path) 197 base::FilePath file_path)
198 : net::URLRequestMockHTTPJob( 198 : net::URLRequestMockHTTPJob(
199 request, 199 request,
200 network_delegate, 200 network_delegate,
201 file_path, 201 file_path,
202 base::CreateTaskRunnerWithTraits( 202 base::CreateTaskRunnerWithTraits(
203 base::TaskTraits() 203 {base::MayBlock(), base::TaskPriority::BACKGROUND,
204 .MayBlock() 204 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})) {}
205 .WithPriority(base::TaskPriority::BACKGROUND)
206 .WithShutdownBehavior(
207 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN))) {}
208 205
209 void Start() override { 206 void Start() override {
210 load_timing_info_.socket_reused = true; 207 load_timing_info_.socket_reused = true;
211 load_timing_info_.request_start_time = base::Time::Now(); 208 load_timing_info_.request_start_time = base::Time::Now();
212 load_timing_info_.request_start = base::TimeTicks::Now(); 209 load_timing_info_.request_start = base::TimeTicks::Now();
213 load_timing_info_.send_start = base::TimeTicks::Now(); 210 load_timing_info_.send_start = base::TimeTicks::Now();
214 load_timing_info_.send_end = base::TimeTicks::Now(); 211 load_timing_info_.send_end = base::TimeTicks::Now();
215 load_timing_info_.receive_headers_end = base::TimeTicks::Now(); 212 load_timing_info_.receive_headers_end = base::TimeTicks::Now();
216 213
217 net::URLRequestMockHTTPJob::Start(); 214 net::URLRequestMockHTTPJob::Start();
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 RunTestFunction(window, "testWindowInitializedOnNavigateBack"); 2074 RunTestFunction(window, "testWindowInitializedOnNavigateBack");
2078 2075
2079 DevToolsWindowTesting::CloseDevToolsWindowSync(window); 2076 DevToolsWindowTesting::CloseDevToolsWindowSync(window);
2080 content::WebUIControllerFactory::UnregisterFactoryForTesting(&test_factory); 2077 content::WebUIControllerFactory::UnregisterFactoryForTesting(&test_factory);
2081 } 2078 }
2082 2079
2083 // Tests scripts panel showing. 2080 // Tests scripts panel showing.
2084 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsSharedWorker) { 2081 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsSharedWorker) {
2085 RunTest("testDevToolsSharedWorker", url::kAboutBlankURL); 2082 RunTest("testDevToolsSharedWorker", url::kAboutBlankURL);
2086 } 2083 }
OLDNEW
« no previous file with comments | « chrome/browser/conflicts/module_inspector_win.cc ('k') | chrome/browser/dom_distiller/dom_distiller_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698