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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/cachestorage/serviceworker/ignore-search-with-credentials.html

Issue 1694213002: CacheStorage: Add ignoreSearch option to cache.delete(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary check Created 4 years, 10 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 | « third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-delete.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Cache Storage: ignore search with credentials</title> 2 <title>Cache Storage: ignore search with credentials</title>
3 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script src="../resources/test-helpers.js"></script> 5 <script src="../resources/test-helpers.js"></script>
6 <script src="../../serviceworker/resources/test-helpers.js"></script> 6 <script src="../../serviceworker/resources/test-helpers.js"></script>
7 <script> 7 <script>
8 8
9 function remove_query(url_string) { 9 function remove_query(url_string) {
10 return url_string.split('?')[0]; 10 return url_string.split('?')[0];
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 }) 66 })
67 .then(function(r) { 67 .then(function(r) {
68 request = r; 68 request = r;
69 return cache.matchAll(request, { ignoreSearch : true }); 69 return cache.matchAll(request, { ignoreSearch : true });
70 }) 70 })
71 .then(function(results) { 71 .then(function(results) {
72 assert_equals(results.length, 2); 72 assert_equals(results.length, 2);
73 var expected = remove_query(request.url); 73 var expected = remove_query(request.url);
74 assert_equals(remove_query(results[0].url), expected); 74 assert_equals(remove_query(results[0].url), expected);
75 assert_equals(remove_query(results[1].url), expected); 75 assert_equals(remove_query(results[1].url), expected);
76 return cache.delete(request, { ignoreSearch : true });
76 }) 77 })
78 .then(function(result) {
79 assert_true(result);
80 return cache.matchAll(request, { ignoreSearch : true });
81 })
82 .then(function(results) {
83 assert_equals(results.length, 0);
84 });
77 }); 85 });
78 86
79 </script> 87 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-delete.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698