| 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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 | 1108 |
| 1109 FetchOnRegisteredWorker(&result, &response2, &blob_data_handle); | 1109 FetchOnRegisteredWorker(&result, &response2, &blob_data_handle); |
| 1110 ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result); | 1110 ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result); |
| 1111 EXPECT_EQ(200, response2.status_code); | 1111 EXPECT_EQ(200, response2.status_code); |
| 1112 EXPECT_EQ("OK", response2.status_text); | 1112 EXPECT_EQ("OK", response2.status_text); |
| 1113 EXPECT_EQ(response1.response_time, response2.response_time); | 1113 EXPECT_EQ(response1.response_time, response2.response_time); |
| 1114 EXPECT_TRUE(response2.is_in_cache_storage); | 1114 EXPECT_TRUE(response2.is_in_cache_storage); |
| 1115 EXPECT_EQ("cache_name", response2.cache_storage_cache_name); | 1115 EXPECT_EQ("cache_name", response2.cache_storage_cache_name); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 // Disabled because console_listener->OnReportConsoleMessageOnUI() will be |
| 1119 // called before WaitForConsoleMessages() is called to set the expected number |
| 1120 // of messages. https://crbug.com/635599 |
| 1118 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, | 1121 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, |
| 1119 FetchEvent_respondWithRejection) { | 1122 DISABLED_FetchEvent_respondWithRejection) { |
| 1120 ServiceWorkerFetchEventResult result; | 1123 ServiceWorkerFetchEventResult result; |
| 1121 ServiceWorkerResponse response; | 1124 ServiceWorkerResponse response; |
| 1122 std::unique_ptr<storage::BlobDataHandle> blob_data_handle; | 1125 std::unique_ptr<storage::BlobDataHandle> blob_data_handle; |
| 1123 | 1126 |
| 1124 RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread, | 1127 RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread, |
| 1125 base::Unretained(this), | 1128 base::Unretained(this), |
| 1126 "/service_worker/fetch_event_rejected.js")); | 1129 "/service_worker/fetch_event_rejected.js")); |
| 1127 | 1130 |
| 1128 ConsoleListener console_listener; | 1131 ConsoleListener console_listener; |
| 1129 RunOnIOThread(base::Bind(&EmbeddedWorkerInstance::AddListener, | 1132 RunOnIOThread(base::Bind(&EmbeddedWorkerInstance::AddListener, |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 | 2025 |
| 2023 IN_PROC_BROWSER_TEST_F(ServiceWorkerDisableWebSecurityTest, UpdateNoCrash) { | 2026 IN_PROC_BROWSER_TEST_F(ServiceWorkerDisableWebSecurityTest, UpdateNoCrash) { |
| 2024 const char kPageUrl[] = "/service_worker/disable_web_security_update.html"; | 2027 const char kPageUrl[] = "/service_worker/disable_web_security_update.html"; |
| 2025 const char kScopeUrl[] = "/service_worker/scope/"; | 2028 const char kScopeUrl[] = "/service_worker/scope/"; |
| 2026 const char kWorkerUrl[] = "/service_worker/fetch_event_blob.js"; | 2029 const char kWorkerUrl[] = "/service_worker/fetch_event_blob.js"; |
| 2027 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl); | 2030 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl); |
| 2028 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl); | 2031 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl); |
| 2029 } | 2032 } |
| 2030 | 2033 |
| 2031 } // namespace content | 2034 } // namespace content |
| OLD | NEW |