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

Unified Diff: extensions/browser/preload_check_test_util.h

Issue 2745433002: PreloadCheckGroup for managing multiple extension PreloadChecks (Closed)
Patch Set: rebase & updates Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/preload_check_group_unittest.cc ('k') | extensions/browser/preload_check_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/preload_check_test_util.h
diff --git a/extensions/browser/preload_check_test_util.h b/extensions/browser/preload_check_test_util.h
index 025ef83099a02e0cd4d0c262753383f0a8658feb..d55a4b8cd255e69c1d81ed12ff35f4e2d88e7049 100644
--- a/extensions/browser/preload_check_test_util.h
+++ b/extensions/browser/preload_check_test_util.h
@@ -29,13 +29,13 @@ class PreloadCheckRunner {
// Starts the check and waits for its callback to execute.
void RunUntilComplete(PreloadCheck* check);
- // Runs the message loop until OnCheckComplete is called.
- void WaitForCompletion();
-
// Runs the message loop until idle. Useful to see whether OnCheckComplete is
// called without waiting indefinitely.
void WaitForIdle();
+ // Runs the message loop until OnCheckComplete is called.
+ void WaitForComplete();
+
PreloadCheck::ResultCallback GetCallback();
const PreloadCheck::Errors& errors() const { return errors_; }
@@ -56,15 +56,16 @@ class PreloadCheckRunner {
// Stub for a PreloadCheck that returns the desired error(s).
class PreloadCheckStub : public PreloadCheck {
public:
- explicit PreloadCheckStub(bool is_async = false);
+ PreloadCheckStub(bool is_async = false, const Errors& errors = Errors());
~PreloadCheckStub() override;
void AddError(Error error);
void set_error_message(const base::string16& message) { message_ = message; }
+ bool started() const { return started_; }
// PreloadCheck:
void Start(ResultCallback callback) override;
- base::string16 GetErrorMessage() const override;
+ // base::string16 GetErrorMessage() const override;
private:
void StartInternal(ResultCallback callback);
@@ -72,6 +73,7 @@ class PreloadCheckStub : public PreloadCheck {
bool is_async_;
Errors errors_;
base::string16 message_;
+ bool started_;
DISALLOW_COPY_AND_ASSIGN(PreloadCheckStub);
};
« no previous file with comments | « extensions/browser/preload_check_group_unittest.cc ('k') | extensions/browser/preload_check_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698