| Index: components/update_client/update_client_unittest.cc
|
| diff --git a/components/update_client/update_client_unittest.cc b/components/update_client/update_client_unittest.cc
|
| index d8ad6df441b3f89b92a93d1dbef90f87a64f8195..c5bccb0acacbb323445966fbcc999b4a21a5df45 100644
|
| --- a/components/update_client/update_client_unittest.cc
|
| +++ b/components/update_client/update_client_unittest.cc
|
| @@ -137,6 +137,7 @@
|
|
|
| protected:
|
| void RunThreads();
|
| + void StopWorkerPool();
|
|
|
| // Returns the full path to a test file.
|
| static base::FilePath TestFilePath(const char* file);
|
| @@ -175,6 +176,10 @@
|
|
|
| void UpdateClientTest::RunThreads() {
|
| runloop_.Run();
|
| +}
|
| +
|
| +void UpdateClientTest::StopWorkerPool() {
|
| + worker_pool_->pool()->Shutdown();
|
| }
|
|
|
| base::FilePath UpdateClientTest::TestFilePath(const char* file) {
|
| @@ -282,6 +287,8 @@
|
| RunThreads();
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests the scenario where two CRXs are checked for updates. On CRX has
|
| @@ -463,6 +470,8 @@
|
| RunThreads();
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests the update check for two CRXs scenario. Both CRXs have updates.
|
| @@ -699,6 +708,8 @@
|
| RunThreads();
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests the scenario where there is a download timeout for the first
|
| @@ -935,6 +946,8 @@
|
| RunThreads();
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests the differential update scenario for one CRX.
|
| @@ -1199,6 +1212,8 @@
|
| }
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests the update scenario for one CRX where the CRX installer returns
|
| @@ -1391,6 +1406,8 @@
|
| RunThreads();
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests the fallback from differential to full update scenario for one CRX.
|
| @@ -1674,6 +1691,8 @@
|
| }
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests the queuing of update checks. In this scenario, two update checks are
|
| @@ -1778,6 +1797,8 @@
|
| RunThreads();
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests the install of one CRX.
|
| @@ -1949,6 +1970,8 @@
|
| RunThreads();
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Tests that overlapping installs of the same CRX result in an error.
|
| @@ -2061,6 +2084,8 @@
|
| RunThreads();
|
|
|
| update_client->RemoveObserver(&observer);
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| // Make sure that we don't get any crashes when trying to update an empty list
|
| @@ -2119,6 +2144,8 @@
|
| empty_id_list, base::Bind(&DataCallbackFake::Callback),
|
| base::Bind(&CompletionCallbackFake::Callback, runloop.QuitClosure()));
|
| runloop.Run();
|
| +
|
| + StopWorkerPool();
|
| }
|
|
|
| } // namespace update_client
|
|
|