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

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

Issue 2787003002: Fetch API: Stop lowercasing header names. (Closed)
Patch Set: Rebase for landing Created 3 years, 8 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/http/tests/fetch/resources/thorough-util.js » ('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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 ServiceWorkerResponse response; 1222 ServiceWorkerResponse response;
1223 std::unique_ptr<storage::BlobDataHandle> blob_data_handle; 1223 std::unique_ptr<storage::BlobDataHandle> blob_data_handle;
1224 InstallTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK); 1224 InstallTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK);
1225 ActivateTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK); 1225 ActivateTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK);
1226 1226
1227 FetchOnRegisteredWorker(&result, &response, &blob_data_handle); 1227 FetchOnRegisteredWorker(&result, &response, &blob_data_handle);
1228 ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result); 1228 ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result);
1229 EXPECT_EQ(301, response.status_code); 1229 EXPECT_EQ(301, response.status_code);
1230 EXPECT_EQ("Moved Permanently", response.status_text); 1230 EXPECT_EQ("Moved Permanently", response.status_text);
1231 ServiceWorkerHeaderMap expected_headers; 1231 ServiceWorkerHeaderMap expected_headers;
1232 expected_headers["content-language"] = "fi"; 1232 expected_headers["Content-Language"] = "fi";
1233 expected_headers["content-type"] = "text/html; charset=UTF-8"; 1233 expected_headers["Content-Type"] = "text/html; charset=UTF-8";
1234 EXPECT_EQ(expected_headers, response.headers); 1234 EXPECT_EQ(expected_headers, response.headers);
1235 1235
1236 std::string body; 1236 std::string body;
1237 RunOnIOThread( 1237 RunOnIOThread(
1238 base::Bind(&ReadResponseBody, 1238 base::Bind(&ReadResponseBody,
1239 &body, base::Owned(blob_data_handle.release()))); 1239 &body, base::Owned(blob_data_handle.release())));
1240 EXPECT_EQ("This resource is gone. Gone, gone, gone.", body); 1240 EXPECT_EQ("This resource is gone. Gone, gone, gone.", body);
1241 } 1241 }
1242 1242
1243 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, 1243 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest,
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
3008 // effect in CanSuspendRenderer(). 3008 // effect in CanSuspendRenderer().
3009 shell()->web_contents()->WasHidden(); 3009 shell()->web_contents()->WasHidden();
3010 EXPECT_TRUE(rph->IsProcessBackgrounded()); 3010 EXPECT_TRUE(rph->IsProcessBackgrounded());
3011 3011
3012 // The process which has service worker thread shouldn't be suspended. 3012 // The process which has service worker thread shouldn't be suspended.
3013 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); 3013 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id));
3014 } 3014 }
3015 #endif 3015 #endif
3016 3016
3017 } // namespace content 3017 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698