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

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

Issue 2854613002: fetch: Drop Headers from HeadersInit typedef declaration. (Closed)
Patch Set: Adjust expectations for ServiceWorkerVersionBrowserTest.FetchEvent_Response Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/fetch/api/headers/headers-basic-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 ServiceWorkerResponse response; 1223 ServiceWorkerResponse response;
1224 std::unique_ptr<storage::BlobDataHandle> blob_data_handle; 1224 std::unique_ptr<storage::BlobDataHandle> blob_data_handle;
1225 InstallTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK); 1225 InstallTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK);
1226 ActivateTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK); 1226 ActivateTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK);
1227 1227
1228 FetchOnRegisteredWorker(&result, &response, &blob_data_handle); 1228 FetchOnRegisteredWorker(&result, &response, &blob_data_handle);
1229 ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result); 1229 ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result);
1230 EXPECT_EQ(301, response.status_code); 1230 EXPECT_EQ(301, response.status_code);
1231 EXPECT_EQ("Moved Permanently", response.status_text); 1231 EXPECT_EQ("Moved Permanently", response.status_text);
1232 ServiceWorkerHeaderMap expected_headers; 1232 ServiceWorkerHeaderMap expected_headers;
1233 expected_headers["Content-Language"] = "fi"; 1233 expected_headers["content-language"] = "fi";
1234 expected_headers["Content-Type"] = "text/html; charset=UTF-8"; 1234 expected_headers["content-type"] = "text/html; charset=UTF-8";
1235 EXPECT_EQ(expected_headers, response.headers); 1235 EXPECT_EQ(expected_headers, response.headers);
1236 1236
1237 std::string body; 1237 std::string body;
1238 RunOnIOThread( 1238 RunOnIOThread(
1239 base::Bind(&ReadResponseBody, 1239 base::Bind(&ReadResponseBody,
1240 &body, base::Owned(blob_data_handle.release()))); 1240 &body, base::Owned(blob_data_handle.release())));
1241 EXPECT_EQ("This resource is gone. Gone, gone, gone.", body); 1241 EXPECT_EQ("This resource is gone. Gone, gone, gone.", body);
1242 } 1242 }
1243 1243
1244 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, 1244 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest,
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 // effect in CanSuspendRenderer(). 3003 // effect in CanSuspendRenderer().
3004 shell()->web_contents()->WasHidden(); 3004 shell()->web_contents()->WasHidden();
3005 EXPECT_TRUE(rph->IsProcessBackgrounded()); 3005 EXPECT_TRUE(rph->IsProcessBackgrounded());
3006 3006
3007 // The process which has service worker thread shouldn't be suspended. 3007 // The process which has service worker thread shouldn't be suspended.
3008 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); 3008 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id));
3009 } 3009 }
3010 #endif 3010 #endif
3011 3011
3012 } // namespace content 3012 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/fetch/api/headers/headers-basic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698