| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>Cache Storage: Verify credential are respected by Cache operations</title
> | 3 <title>Cache Storage: Verify credential are respected by Cache operations</title
> |
| 4 <link rel="help" href="https://slightlyoff.github.io/ServiceWorker/spec/service_
worker/#cache-storage"> | 4 <link rel="help" href="https://slightlyoff.github.io/ServiceWorker/spec/service_
worker/#cache-storage"> |
| 5 <script src="/resources/testharness.js"></script> | 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> | 6 <script src="/resources/testharnessreport.js"></script> |
| 7 <script src="../../serviceworker/resources/test-helpers.js"></script> | 7 <script src="../../serviceworker/resources/test-helpers.js"></script> |
| 8 <style>iframe { display: none; }</style> | 8 <style>iframe { display: none; }</style> |
| 9 <script> | 9 <script> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 {name: 'file.txt', username: 'cc', password: 'dd'}, | 27 {name: 'file.txt', username: 'cc', password: 'dd'}, |
| 28 {name: 'file.txt'} | 28 {name: 'file.txt'} |
| 29 ], '*'); | 29 ], '*'); |
| 30 return new Promise(function(resolve, reject) { | 30 return new Promise(function(resolve, reject) { |
| 31 window.onmessage = t.step_func(function(e) { | 31 window.onmessage = t.step_func(function(e) { |
| 32 resolve(e.data); | 32 resolve(e.data); |
| 33 }); | 33 }); |
| 34 }); | 34 }); |
| 35 }) | 35 }) |
| 36 .then(function(data) { | 36 .then(function(data) { |
| 37 assert_equals(data.length, 1, 'three entries should be present'); | 37 assert_equals(data.length, 3, 'three entries should be present'); |
| 38 assert_equals(data.filter(function(url) { return /@/.test(url); }).length,
0, | 38 assert_equals(data.filter(function(url) { return /@/.test(url); }).length,
2, |
| 39 'two entries should contain credentials'); | 39 'two entries should contain credentials'); |
| 40 assert_false(data.some(function(url) { return /aa:bb@/.test(url); }), | 40 assert_true(data.some(function(url) { return /aa:bb@/.test(url); }), |
| 41 'entry with credentials aa:bb should be present'); | 41 'entry with credentials aa:bb should be present'); |
| 42 assert_false(data.some(function(url) { return /cc:dd@/.test(url); }), | 42 assert_true(data.some(function(url) { return /cc:dd@/.test(url); }), |
| 43 'entry with credentials cc:dd should be present'); | 43 'entry with credentials cc:dd should be present'); |
| 44 }); | 44 }); |
| 45 }); | 45 }); |
| 46 </script> | 46 </script> |
| OLD | NEW |