blob: dadb5af6b7366c0079aaa5f6ea12c64a5da99161 [file] [log] [blame]
<?php
// TODO(iclelland): Generate this sample token during the build. The token
// below will expire in 2033, but it would be better to always have a token which
// is guaranteed to be valid when the tests are run.
// NOTE: The token must match the UNAUTHENTICATED_ORIGIN used in the test.
// Generate this token with the command:
// generate_token.py http://example.test:8000 Frobulate -expire-timestamp=2000000000
header("Origin-Trial: AssYG8Dct5/L5padhnjY6g63QMKaEchk64tb7jpY54iNXQdEKSKB5f1w2dR+6sFB1Flxp/xni7S1HOpe8Wh9VwcAAABUeyJvcmlnaW4iOiAiaHR0cDovL2V4YW1wbGUudGVzdDo4MDAwIiwgImZlYXR1cmUiOiAiRnJvYnVsYXRlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9");
?>
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test Sample API when trial is enabled, in insecure context</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../resources/get-host-info.js"></script>
<script src="resources/origintrials.js"></script>
<script>
if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
window.location = get_host_info().UNAUTHENTICATED_ORIGIN +
window.location.pathname;
} else {
// The trial is enabled by the token above in the meta tag.
expect_success_bindings_insecure_context();
}
</script>