| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <map> | 7 #include <map> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 | 881 |
| 882 void OnThreadStarted() override { | 882 void OnThreadStarted() override { |
| 883 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, quit_); | 883 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, quit_); |
| 884 } | 884 } |
| 885 bool OnMessageReceived(const IPC::Message& message) override { return false; } | 885 bool OnMessageReceived(const IPC::Message& message) override { return false; } |
| 886 | 886 |
| 887 private: | 887 private: |
| 888 base::Closure quit_; | 888 base::Closure quit_; |
| 889 }; | 889 }; |
| 890 | 890 |
| 891 // This test has started flaking somewhat consistently on Win, Mac and Linux. | 891 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, TimeoutStartingWorker) { |
| 892 // Disabling for now, see http://crbug.com/496065. | |
| 893 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, | |
| 894 DISABLED_TimeoutStartingWorker) { | |
| 895 RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread, this, | 892 RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread, this, |
| 896 "/service_worker/while_true_worker.js")); | 893 "/service_worker/while_true_worker.js")); |
| 897 | 894 |
| 898 // Start a worker, waiting until the script is loaded. | 895 // Start a worker, waiting until the script is loaded. |
| 899 ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED; | 896 ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED; |
| 900 base::RunLoop start_run_loop; | 897 base::RunLoop start_run_loop; |
| 901 base::RunLoop load_run_loop; | 898 base::RunLoop load_run_loop; |
| 902 WaitForLoaded wait_for_load(load_run_loop.QuitClosure()); | 899 WaitForLoaded wait_for_load(load_run_loop.QuitClosure()); |
| 903 version_->embedded_worker()->AddListener(&wait_for_load); | 900 version_->embedded_worker()->AddListener(&wait_for_load); |
| 904 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 901 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 ASSERT_EQ(SERVICE_WORKER_OK, status); | 1481 ASSERT_EQ(SERVICE_WORKER_OK, status); |
| 1485 // Stop the worker. | 1482 // Stop the worker. |
| 1486 StopWorker(SERVICE_WORKER_OK); | 1483 StopWorker(SERVICE_WORKER_OK); |
| 1487 // Restart the worker. | 1484 // Restart the worker. |
| 1488 StartWorker(SERVICE_WORKER_OK); | 1485 StartWorker(SERVICE_WORKER_OK); |
| 1489 // Stop the worker. | 1486 // Stop the worker. |
| 1490 StopWorker(SERVICE_WORKER_OK); | 1487 StopWorker(SERVICE_WORKER_OK); |
| 1491 } | 1488 } |
| 1492 | 1489 |
| 1493 } // namespace content | 1490 } // namespace content |
| OLD | NEW |