| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 sync_run_loop.QuitClosure(), | 663 sync_run_loop.QuitClosure(), |
| 664 &status)); | 664 &status)); |
| 665 sync_run_loop.Run(); | 665 sync_run_loop.Run(); |
| 666 ASSERT_EQ(SERVICE_WORKER_OK, status); | 666 ASSERT_EQ(SERVICE_WORKER_OK, status); |
| 667 | 667 |
| 668 // Should 200 after sync event. | 668 // Should 200 after sync event. |
| 669 FetchOnRegisteredWorker(&result, &response, &blob_data_handle); | 669 FetchOnRegisteredWorker(&result, &response, &blob_data_handle); |
| 670 EXPECT_EQ(200, response.status_code); | 670 EXPECT_EQ(200, response.status_code); |
| 671 } | 671 } |
| 672 | 672 |
| 673 IN_PROC_BROWSER_TEST_F(ServiceWorkerBrowserTest, Reload) { | 673 IN_PROC_BROWSER_TEST_F(ServiceWorkerBrowserTest, DISABLED_Reload) { |
| 674 const std::string kPageUrl = "/service_worker/reload.html"; | 674 const std::string kPageUrl = "/service_worker/reload.html"; |
| 675 const std::string kWorkerUrl = "/service_worker/fetch_event_reload.js"; | 675 const std::string kWorkerUrl = "/service_worker/fetch_event_reload.js"; |
| 676 { | 676 { |
| 677 scoped_refptr<WorkerActivatedObserver> observer = | 677 scoped_refptr<WorkerActivatedObserver> observer = |
| 678 new WorkerActivatedObserver(wrapper()); | 678 new WorkerActivatedObserver(wrapper()); |
| 679 observer->Init(); | 679 observer->Init(); |
| 680 public_context()->RegisterServiceWorker( | 680 public_context()->RegisterServiceWorker( |
| 681 embedded_test_server()->GetURL(kPageUrl), | 681 embedded_test_server()->GetURL(kPageUrl), |
| 682 embedded_test_server()->GetURL(kWorkerUrl), | 682 embedded_test_server()->GetURL(kWorkerUrl), |
| 683 base::Bind(&ExpectResultAndRun, true, base::Bind(&base::DoNothing))); | 683 base::Bind(&ExpectResultAndRun, true, base::Bind(&base::DoNothing))); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, | 821 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, |
| 822 this, | 822 this, |
| 823 embedded_test_server()->GetURL("/service_worker/empty.html"), | 823 embedded_test_server()->GetURL("/service_worker/empty.html"), |
| 824 &status, | 824 &status, |
| 825 &script_url)); | 825 &script_url)); |
| 826 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); | 826 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 } // namespace content | 830 } // namespace content |
| OLD | NEW |