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 by script-added meta tag, without t
ouching the objects</title> | 3 <title>Test Sample API when trial is enabled by script-added meta tag, without t
ouching the objects</title> |
4 <script src="../resources/testharness.js"></script> | 4 <script src="../resources/testharness.js"></script> |
5 <script src="../resources/testharnessreport.js"></script> | 5 <script src="../resources/testharnessreport.js"></script> |
6 <script src="../resources/origin-trials-helper.js"></script> | 6 <script src="../resources/origin-trials-helper.js"></script> |
7 <script src="resources/origin_trials.js"></script> | 7 <script src="resources/origintrials.js"></script> |
8 <script> | 8 <script> |
9 | 9 |
10 // TODO(iclelland): Generate this sample token during the build. The token | 10 // TODO(iclelland): Generate this sample token during the build. The token |
11 // below will expire in 2033, but it would be better to always have a token wh
ich | 11 // below will expire in 2033, but it would be better to always have a token wh
ich |
12 // is guaranteed to be valid when the tests are run. --> | 12 // is guaranteed to be valid when the tests are run. --> |
13 // Generate this token with the command: | 13 // Generate this token with the command: |
14 // generate_token.py http://127.0.0.1:8000 Frobulate -expire-timestamp=200000000
0 | 14 // generate_token.py http://127.0.0.1:8000 Frobulate -expire-timestamp=200000000
0 |
15 var token = "AlCoOPbezqtrGMzSzbLQC4c+oPqO6yuioemcBPjgcXajF8jtmZr4B8tJRPAARPbsX6h
DeVyXCKHzEJfpBXvZgQEAAABReyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR
1cmUiOiAiRnJvYnVsYXRlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9"; | 15 var token = "AlCoOPbezqtrGMzSzbLQC4c+oPqO6yuioemcBPjgcXajF8jtmZr4B8tJRPAARPbsX6h
DeVyXCKHzEJfpBXvZgQEAAABReyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR
1cmUiOiAiRnJvYnVsYXRlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9"; |
16 | 16 |
17 // Do not access internals.OriginTrials() before adding the token. Can then test | 17 // Do not access internals.OriginTrials() before adding the token. Can then test |
18 // the case where the target object(s) do not exist when the trial is enabled. | 18 // the case where the target object(s) do not exist when the trial is enabled. |
19 | 19 |
20 // Add the token to enable the trial | 20 // Add the token to enable the trial |
21 OriginTrialsHelper.add_token(token); | 21 OriginTrialsHelper.add_token(token); |
22 | 22 |
23 // The trial is now enabled, by the token added via script. | 23 // The trial is now enabled, by the token added via script. |
24 expect_success(); | 24 expect_success(); |
25 | 25 |
26 </script> | 26 </script> |
OLD | NEW |