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

Unified Diff: extensions/browser/preload_check_test_util.h

Issue 2783143005: Replace ExtensionInstallChecker with generic PreloadCheckGroup (Closed)
Patch Set: fix debug build 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 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 3ef1fd99de47f1f895b8304a5689e819924c6475..d849ef770bb40c34f53427a321daf9234f535bc9 100644
--- a/extensions/browser/preload_check_test_util.h
+++ b/extensions/browser/preload_check_test_util.h
@@ -31,7 +31,7 @@ class PreloadCheckRunner {
void RunUntilComplete(PreloadCheck* check);
// Runs the message loop until OnCheckComplete is called.
- void WaitForCompletion();
+ void WaitForComplete();
// Runs the message loop until idle. Useful to see whether OnCheckComplete is
// called without waiting indefinitely.
@@ -54,28 +54,24 @@ class PreloadCheckRunner {
DISALLOW_COPY_AND_ASSIGN(PreloadCheckRunner);
};
-// Stub for a PreloadCheck that returns the desired error(s).
+// Stub for a PreloadCheck that calls the callback with the given error(s).
class PreloadCheckStub : public PreloadCheck {
public:
- PreloadCheckStub();
+ explicit PreloadCheckStub(const Errors& errors);
~PreloadCheckStub() override;
- void AddError(Error error);
- void set_error_message(const base::string16& message) { message_ = message; }
-
- bool is_async() const { return is_async_; }
void set_is_async(bool is_async) { is_async_ = is_async; }
+ bool started() const { return started_; }
// PreloadCheck:
void Start(ResultCallback callback) override;
- base::string16 GetErrorMessage() const override;
private:
void RunCallback(ResultCallback callback);
bool is_async_ = false;
+ bool started_ = false;
Errors errors_;
- base::string16 message_;
base::WeakPtrFactory<PreloadCheckStub> weak_ptr_factory_;
« 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