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

Side by Side Diff: chrome/browser/prerender/prerender_test_utils.h

Issue 2807163002: [Prerender] Restore request priorities when swapped in (Closed)
Patch Set: Fix test: default image priority can be LOWEST or MEDIUM Created 3 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_TEST_UTILS_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_TEST_UTILS_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_TEST_UTILS_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_TEST_UTILS_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <functional> 9 #include <functional>
10 #include <memory> 10 #include <memory>
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // thread. Does not modify the behavior or the request job. 426 // thread. Does not modify the behavior or the request job.
427 void InterceptRequestAndCount( 427 void InterceptRequestAndCount(
428 const GURL& url, 428 const GURL& url,
429 RequestCounter* counter, 429 RequestCounter* counter,
430 base::Callback<void(net::URLRequest*)> callback_io); 430 base::Callback<void(net::URLRequest*)> callback_io);
431 431
432 // Makes |url| respond to requests with the contents of |file|. 432 // Makes |url| respond to requests with the contents of |file|.
433 void CreateMockInterceptorOnIO(const GURL& url, const base::FilePath& file); 433 void CreateMockInterceptorOnIO(const GURL& url, const base::FilePath& file);
434 434
435 // Makes |url| never respond on the first load, and then with the contents of 435 // Makes |url| never respond on the first load, and then with the contents of
436 // |file| afterwards. When the first load has been scheduled, runs |callback| on 436 // |file| afterwards. When the first load has been scheduled, runs |callback_io|
437 // the UI thread. 437 // on the IO thread.
438 void CreateHangingFirstRequestInterceptorOnIO( 438 void CreateHangingFirstRequestInterceptor(
439 const GURL& url, const base::FilePath& file, base::Closure callback); 439 const GURL& url,
440 const base::FilePath& file,
441 base::Callback<void(net::URLRequest*)> callback_io);
440 442
441 } // namespace test_utils 443 } // namespace test_utils
442 444
443 } // namespace prerender 445 } // namespace prerender
444 446
445 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_TEST_UTILS_H_ 447 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_resource_throttle.cc ('k') | chrome/browser/prerender/prerender_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698