| Index: content/public/test/download_test_observer.cc
|
| diff --git a/content/public/test/download_test_observer.cc b/content/public/test/download_test_observer.cc
|
| index cc26ff02a45a7ef0ec013ccc80bdf72eed4a341a..2d322e52d24ac0b21e3566468812af0267b13a54 100644
|
| --- a/content/public/test/download_test_observer.cc
|
| +++ b/content/public/test/download_test_observer.cc
|
| @@ -255,7 +255,7 @@ DownloadTestObserverTerminal::~DownloadTestObserverTerminal() {
|
|
|
| bool DownloadTestObserverTerminal::IsDownloadInFinalState(
|
| DownloadItem* download) {
|
| - return (download->GetState() != DownloadItem::IN_PROGRESS);
|
| + return download->IsDone();
|
| }
|
|
|
| DownloadTestObserverInProgress::DownloadTestObserverInProgress(
|
| @@ -281,6 +281,29 @@ bool DownloadTestObserverInProgress::IsDownloadInFinalState(
|
| !download->GetTargetFilePath().empty();
|
| }
|
|
|
| +DownloadTestObserverInterrupted::DownloadTestObserverInterrupted(
|
| + DownloadManager* download_manager,
|
| + size_t wait_count,
|
| + DangerousDownloadAction dangerous_download_action)
|
| + : DownloadTestObserver(download_manager,
|
| + wait_count,
|
| + dangerous_download_action) {
|
| + // You can't rely on overriden virtual functions in a base class constructor;
|
| + // the virtual function table hasn't been set up yet. So, we have to do any
|
| + // work that depends on those functions in the derived class constructor
|
| + // instead. In this case, it's because of |IsDownloadInFinalState()|.
|
| + Init();
|
| +}
|
| +
|
| +DownloadTestObserverInterrupted::~DownloadTestObserverInterrupted() {
|
| +}
|
| +
|
| +
|
| +bool DownloadTestObserverInterrupted::IsDownloadInFinalState(
|
| + DownloadItem* download) {
|
| + return download->GetState() == DownloadItem::INTERRUPTED;
|
| +}
|
| +
|
| DownloadTestFlushObserver::DownloadTestFlushObserver(
|
| DownloadManager* download_manager)
|
| : download_manager_(download_manager),
|
|
|