| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
| 3 <title>Test Sample API when trial is enabled, in insecure context</title> |
| 3 <!-- TODO(iclelland): Generate this sample token during the build. The token | 4 <!-- TODO(iclelland): Generate this sample token during the build. The token |
| 4 below will expire in 2033, but it would be better to always have a token which | 5 below will expire in 2033, but it would be better to always have a token which |
| 5 is guaranteed to be valid when the tests are run. --> | 6 is guaranteed to be valid when the tests are run. --> |
| 6 <!-- Generate this token with the command: | 7 <!-- Generate this token with the command: |
| 7 generate_token.py http://127.0.0.1:8000 Frobulate -expire-timestamp=2000000000 | 8 generate_token.py http://127.0.0.1:8000 Frobulate -expire-timestamp=2000000000 |
| 8 --> | 9 --> |
| 9 <meta http-equiv="origin-trial" content="AlCoOPbezqtrGMzSzbLQC4c+oPqO6yuioemcBPj
gcXajF8jtmZr4B8tJRPAARPbsX6hDeVyXCKHzEJfpBXvZgQEAAABReyJvcmlnaW4iOiAiaHR0cDovLzE
yNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiRnJvYnVsYXRlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB
9" /> | 10 <meta http-equiv="origin-trial" content="AlCoOPbezqtrGMzSzbLQC4c+oPqO6yuioemcBPj
gcXajF8jtmZr4B8tJRPAARPbsX6hDeVyXCKHzEJfpBXvZgQEAAABReyJvcmlnaW4iOiAiaHR0cDovLzE
yNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiRnJvYnVsYXRlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB
9" /> |
| 10 <script src="../resources/testharness.js"></script> | 11 <script src="../resources/testharness.js"></script> |
| 11 <script src="../resources/testharnessreport.js"></script> | 12 <script src="../resources/testharnessreport.js"></script> |
| 13 <script src="../resources/get-host-info.js"></script> |
| 12 <script src="resources/origintrials.js"></script> | 14 <script src="resources/origintrials.js"></script> |
| 13 <script> | 15 <script> |
| 14 | 16 |
| 15 // The trial is enabled by the token above in the meta tag. | 17 if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
| 16 expect_success(); | 18 window.location = get_host_info().UNAUTHENTICATED_ORIGIN + |
| 17 | 19 window.location.pathname; |
| 20 } else { |
| 21 // The trial is enabled by the token above in the meta tag. |
| 22 expect_success_bindings_insecure_context(); |
| 23 } |
| 18 </script> | 24 </script> |
| OLD | NEW |