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

Unified Diff: content/public/test/download_test_observer.h

Issue 17450008: [Downloads] Make DownloadTestObserverTerminal condition on IsDone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « content/browser/download/download_browsertest.cc ('k') | content/public/test/download_test_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/download_test_observer.h
diff --git a/content/public/test/download_test_observer.h b/content/public/test/download_test_observer.h
index c5e94765da7380f38e75712cf6e6e3e71a9e801f..03dd588ad79aedf622cf13434187f8d23371af21 100644
--- a/content/public/test/download_test_observer.h
+++ b/content/public/test/download_test_observer.h
@@ -170,7 +170,8 @@ class DownloadTestObserver : public DownloadManager::Observer,
class DownloadTestObserverTerminal : public DownloadTestObserver {
public:
// Create an object that will be considered finished when |wait_count|
- // download items have entered a terminal state (any but IN_PROGRESS).
+ // download items have entered a terminal state (DownloadItem::IsDone() is
+ // true).
DownloadTestObserverTerminal(
DownloadManager* download_manager,
size_t wait_count,
@@ -204,6 +205,23 @@ class DownloadTestObserverInProgress : public DownloadTestObserver {
DISALLOW_COPY_AND_ASSIGN(DownloadTestObserverInProgress);
};
+class DownloadTestObserverInterrupted : public DownloadTestObserver {
+ public:
+ // Create an object that will be considered finished when |wait_count|
+ // download items are interrupted.
+ DownloadTestObserverInterrupted(
+ DownloadManager* download_manager,
+ size_t wait_count,
+ DangerousDownloadAction dangerous_download_action);
+
+ virtual ~DownloadTestObserverInterrupted();
+
+ private:
+ virtual bool IsDownloadInFinalState(DownloadItem* download) OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(DownloadTestObserverInterrupted);
+};
+
// The WaitForFlush() method on this class returns after:
// * There are no IN_PROGRESS download items remaining on the
// DownloadManager.
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | content/public/test/download_test_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698