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

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

Issue 2435693005: Change the final status to APP_TERMINATING on shutdown (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 (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 <functional> 8 #include <functional>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 public: 98 public:
99 TestPrerenderContents(PrerenderManager* prerender_manager, 99 TestPrerenderContents(PrerenderManager* prerender_manager,
100 Profile* profile, 100 Profile* profile,
101 const GURL& url, 101 const GURL& url,
102 const content::Referrer& referrer, 102 const content::Referrer& referrer,
103 Origin origin, 103 Origin origin,
104 FinalStatus expected_final_status); 104 FinalStatus expected_final_status);
105 105
106 ~TestPrerenderContents() override; 106 ~TestPrerenderContents() override;
107 107
108 void RenderProcessGone(base::TerminationStatus status) override;
109 bool CheckURL(const GURL& url) override; 108 bool CheckURL(const GURL& url) override;
110 109
111 // For tests that open the prerender in a new background tab, the RenderView 110 // For tests that open the prerender in a new background tab, the RenderView
112 // will not have been made visible when the PrerenderContents is destroyed 111 // will not have been made visible when the PrerenderContents is destroyed
113 // even though it is used. 112 // even though it is used.
114 void set_should_be_shown(bool value) { should_be_shown_ = value; } 113 void set_should_be_shown(bool value) { should_be_shown_ = value; }
115 114
116 // For tests which do not know whether the prerender will be used. 115 // For tests which do not know whether the prerender will be used.
117 void set_skip_final_checks(bool value) { skip_final_checks_ = value; } 116 void set_skip_final_checks(bool value) { skip_final_checks_ = value; }
118 117
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 const base::WeakPtr<RequestCounter>& counter); 373 const base::WeakPtr<RequestCounter>& counter);
375 374
376 // Makes |url| respond to requests with the contents of |file|. 375 // Makes |url| respond to requests with the contents of |file|.
377 void CreateMockInterceptorOnIO(const GURL& url, const base::FilePath& file); 376 void CreateMockInterceptorOnIO(const GURL& url, const base::FilePath& file);
378 377
379 } // namespace test_utils 378 } // namespace test_utils
380 379
381 } // namespace prerender 380 } // namespace prerender
382 381
383 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_TEST_UTILS_H_ 382 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/browser/prerender/prerender_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698