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

Side by Side Diff: content/browser/service_worker/service_worker_job_unittest.cc

Issue 2491613004: Make base::Timer sequence-friendly. (Closed)
Patch Set: add back commented out DCHECK in Stop() Created 3 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_browsertest.cc ('k') | media/base/android/media_codec_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698