| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
| 3 <!-- Generate these token with the commands: | 3 <!-- Generate these token with the commands: |
| 4 generate_token.py http://127.0.0.1:8000 ServiceWorkerNavigationPreload -expire-
timestamp=2000000000 | 4 generate_token.py http://127.0.0.1:8000 ServiceWorkerNavigationPreload -expire-
timestamp=2000000000 |
| 5 --> | 5 --> |
| 6 <meta http-equiv="origin-trial" content="AsAA4dg2Rm+GSgnpyxxnpVk1Bk8CcE+qVBTDpPb
IFNscyNRJOdqw1l0vkC4dtsGm1tmP4ZDAKwycQDzsc9xr7gMAAABmeyJvcmlnaW4iOiAiaHR0cDovLzE
yNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiU2VydmljZVdvcmtlck5hdmlnYXRpb25QcmVsb2FkIiw
gImV4cGlyeSI6IDIwMDAwMDAwMDB9" /> | 6 <meta http-equiv="origin-trial" content="AsAA4dg2Rm+GSgnpyxxnpVk1Bk8CcE+qVBTDpPb
IFNscyNRJOdqw1l0vkC4dtsGm1tmP4ZDAKwycQDzsc9xr7gMAAABmeyJvcmlnaW4iOiAiaHR0cDovLzE
yNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiU2VydmljZVdvcmtlck5hdmlnYXRpb25QcmVsb2FkIiw
gImV4cGlyeSI6IDIwMDAwMDAwMDB9" /> |
| 7 <title>Navigation Preload origin trial</title> | 7 <title>Navigation Preload origin trial</title> |
| 8 <script src="../../resources/testharness.js"></script> | 8 <script src="../../resources/testharness.js"></script> |
| 9 <script src="../../resources/testharnessreport.js"></script> | 9 <script src="../../resources/testharnessreport.js"></script> |
| 10 <script src="../resources/test-helpers.js"></script> | 10 <script src="../resources/test-helpers.js"></script> |
| 11 <script src="./resources/get-interface-names.js"></script> | 11 <script src="./resources/get-interface-names.js"></script> |
| 12 <script> | 12 <script> |
| 13 console.warn('This test relies on console message comparison so there can ' + |
| 14 'be different -expected.txt files for virtual test suites.'); |
| 15 |
| 13 test(t => { | 16 test(t => { |
| 14 var interfaces = | 17 var interfaces = |
| 15 get_interface_names(this, ['NavigationPreloadManager', | 18 get_interface_names(this, ['NavigationPreloadManager', |
| 16 'FetchEvent', | 19 'FetchEvent', |
| 17 'ServiceWorkerRegistration']); | 20 'ServiceWorkerRegistration']); |
| 18 console.log('Interfaces in document\n' + interfaces); | 21 console.log('Interfaces in document\n' + interfaces); |
| 19 }, "Navigation preload related interfaces in Origin-Trial enabled document."); | 22 }, "Navigation preload related interfaces in Origin-Trial enabled document."); |
| 20 | 23 |
| 21 function check_interfaces_in_sw(t, script, scope) { | 24 function check_interfaces_in_sw(t, script, scope) { |
| 22 var worker; | 25 var worker; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 'origintrial=true'; | 65 'origintrial=true'; |
| 63 var scope = | 66 var scope = |
| 64 './resources/navigation-preload-origin-trial-interfaces-scope-enabled'; | 67 './resources/navigation-preload-origin-trial-interfaces-scope-enabled'; |
| 65 return check_interfaces_in_sw(t, script, scope) | 68 return check_interfaces_in_sw(t, script, scope) |
| 66 .then(message => { | 69 .then(message => { |
| 67 console.log('Interfaces in Origin-Trial enabled Service Worker\n' + | 70 console.log('Interfaces in Origin-Trial enabled Service Worker\n' + |
| 68 message); | 71 message); |
| 69 }); | 72 }); |
| 70 }, "Navigation preload related interfaces in Origin-Trial enabled SW."); | 73 }, "Navigation preload related interfaces in Origin-Trial enabled SW."); |
| 71 </script> | 74 </script> |
| OLD | NEW |