| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 #include <tuple> | 6 #include <tuple> |
| 7 | 7 |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 EXPECT_EQ(new_version.get(), registration->active_version()); | 1793 EXPECT_EQ(new_version.get(), registration->active_version()); |
| 1794 EXPECT_EQ(ServiceWorkerVersion::ACTIVATING, new_version->status()); | 1794 EXPECT_EQ(ServiceWorkerVersion::ACTIVATING, new_version->status()); |
| 1795 | 1795 |
| 1796 // Shutdown. | 1796 // Shutdown. |
| 1797 update_helper->context()->wrapper()->Shutdown(); | 1797 update_helper->context()->wrapper()->Shutdown(); |
| 1798 update_helper->set_force_start_worker_failure(true); | 1798 update_helper->set_force_start_worker_failure(true); |
| 1799 | 1799 |
| 1800 // Allow the activation to continue. It will fail, and the worker | 1800 // Allow the activation to continue. It will fail, and the worker |
| 1801 // should not be promoted to ACTIVATED because failure occur | 1801 // should not be promoted to ACTIVATED because failure occur |
| 1802 // during shutdown. | 1802 // during shutdown. |
| 1803 runner->RunUntilIdle(); | 1803 runner->RunPendingTasks(); |
| 1804 base::RunLoop().RunUntilIdle(); | 1804 base::RunLoop().RunUntilIdle(); |
| 1805 EXPECT_EQ(new_version.get(), registration->active_version()); | 1805 EXPECT_EQ(new_version.get(), registration->active_version()); |
| 1806 EXPECT_EQ(ServiceWorkerVersion::ACTIVATING, new_version->status()); | 1806 EXPECT_EQ(ServiceWorkerVersion::ACTIVATING, new_version->status()); |
| 1807 registration->RemoveListener(update_helper); | 1807 registration->RemoveListener(update_helper); |
| 1808 } | 1808 } |
| 1809 | 1809 |
| 1810 } // namespace content | 1810 } // namespace content |
| OLD | NEW |