| 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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 sync_run_loop.QuitClosure(), | 740 sync_run_loop.QuitClosure(), |
| 741 &status)); | 741 &status)); |
| 742 sync_run_loop.Run(); | 742 sync_run_loop.Run(); |
| 743 ASSERT_EQ(SERVICE_WORKER_OK, status); | 743 ASSERT_EQ(SERVICE_WORKER_OK, status); |
| 744 | 744 |
| 745 // Should 200 after sync event. | 745 // Should 200 after sync event. |
| 746 FetchOnRegisteredWorker(&result, &response, &blob_data_handle); | 746 FetchOnRegisteredWorker(&result, &response, &blob_data_handle); |
| 747 EXPECT_EQ(200, response.status_code); | 747 EXPECT_EQ(200, response.status_code); |
| 748 } | 748 } |
| 749 | 749 |
| 750 // ServiceWorkerBrowserTest.Reload is flaky crbug.com/393486 | 750 // ServiceWorkerBrowserTest.Reload is flaky on Android crbug.com/393486 |
| 751 IN_PROC_BROWSER_TEST_F(ServiceWorkerBrowserTest, DISABLED_Reload) { | 751 #if defined(OS_ANDROID) |
| 752 #define MAYBE_Reload DISABLED_Reload |
| 753 #else |
| 754 #define MAYBE_Reload Reload |
| 755 #endif |
| 756 IN_PROC_BROWSER_TEST_F(ServiceWorkerBrowserTest, MAYBE_Reload) { |
| 752 const std::string kPageUrl = "/service_worker/reload.html"; | 757 const std::string kPageUrl = "/service_worker/reload.html"; |
| 753 const std::string kWorkerUrl = "/service_worker/fetch_event_reload.js"; | 758 const std::string kWorkerUrl = "/service_worker/fetch_event_reload.js"; |
| 754 { | 759 { |
| 755 scoped_refptr<WorkerActivatedObserver> observer = | 760 scoped_refptr<WorkerActivatedObserver> observer = |
| 756 new WorkerActivatedObserver(wrapper()); | 761 new WorkerActivatedObserver(wrapper()); |
| 757 observer->Init(); | 762 observer->Init(); |
| 758 public_context()->RegisterServiceWorker( | 763 public_context()->RegisterServiceWorker( |
| 759 embedded_test_server()->GetURL(kPageUrl), | 764 embedded_test_server()->GetURL(kPageUrl), |
| 760 embedded_test_server()->GetURL(kWorkerUrl), | 765 embedded_test_server()->GetURL(kWorkerUrl), |
| 761 base::Bind(&ExpectResultAndRun, true, base::Bind(&base::DoNothing))); | 766 base::Bind(&ExpectResultAndRun, true, base::Bind(&base::DoNothing))); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, | 940 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, |
| 936 this, | 941 this, |
| 937 embedded_test_server()->GetURL("/service_worker/empty.html"), | 942 embedded_test_server()->GetURL("/service_worker/empty.html"), |
| 938 &status, | 943 &status, |
| 939 &script_url)); | 944 &script_url)); |
| 940 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); | 945 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); |
| 941 } | 946 } |
| 942 } | 947 } |
| 943 | 948 |
| 944 } // namespace content | 949 } // namespace content |
| OLD | NEW |