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

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

Issue 2521793004: service worker: Persist NavigationPreloadState (Closed)
Patch Set: expect_ name Created 4 years 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 | content/browser/service_worker/service_worker_database.h » ('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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 request_log_[request.relative_url].push_back(request); 1554 request_log_[request.relative_url].push_back(request);
1555 } 1555 }
1556 }; 1556 };
1557 1557
1558 const std::string 1558 const std::string
1559 ServiceWorkerNavigationPreloadTest::kNavigationPreloadHeaderName( 1559 ServiceWorkerNavigationPreloadTest::kNavigationPreloadHeaderName(
1560 "Service-Worker-Navigation-Preload"); 1560 "Service-Worker-Navigation-Preload");
1561 1561
1562 const std::string 1562 const std::string
1563 ServiceWorkerNavigationPreloadTest::kEnableNavigationPreloadScript( 1563 ServiceWorkerNavigationPreloadTest::kEnableNavigationPreloadScript(
1564 "self.addEventListener('install', event => {\n" 1564 "self.addEventListener('activate', event => {\n"
1565 " event.waitUntil(self.registration.navigationPreload.enable());\n" 1565 " event.waitUntil(self.registration.navigationPreload.enable());\n"
1566 " });\n"); 1566 " });\n");
1567 1567
1568 const std::string 1568 const std::string
1569 ServiceWorkerNavigationPreloadTest::kPreloadResponseTestScript = 1569 ServiceWorkerNavigationPreloadTest::kPreloadResponseTestScript =
1570 "var preload_resolve;\n" 1570 "var preload_resolve;\n"
1571 "var preload_promise = new Promise(r => { preload_resolve = r; });\n" 1571 "var preload_promise = new Promise(r => { preload_resolve = r; });\n"
1572 "self.addEventListener('fetch', event => {\n" 1572 "self.addEventListener('fetch', event => {\n"
1573 " event.waitUntil(event.preloadResponse.then(\n" 1573 " event.waitUntil(event.preloadResponse.then(\n"
1574 " r => {\n" 1574 " r => {\n"
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 ServiceWorkerV8CacheStrategiesNormalTest, 2847 ServiceWorkerV8CacheStrategiesNormalTest,
2848 ::testing::Values(true, false)); 2848 ::testing::Values(true, false));
2849 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, 2849 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest,
2850 ServiceWorkerV8CacheStrategiesAggressiveTest, 2850 ServiceWorkerV8CacheStrategiesAggressiveTest,
2851 ::testing::Values(true, false)); 2851 ::testing::Values(true, false));
2852 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, 2852 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest,
2853 ServiceWorkerDisableWebSecurityTest, 2853 ServiceWorkerDisableWebSecurityTest,
2854 ::testing::Values(true, false)); 2854 ::testing::Values(true, false));
2855 2855
2856 } // namespace content 2856 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698