blob: a00a56662aae1922f942c8ed418ef93f27e5e1f1 [file] [log] [blame]
<html manifest="resources/wrong-signature-2.manifest">
<!--
Generate this token with the command:
tools/origin_trials/generate_token.py http://127.0.0.1:8000 AppCache --expire-days=2000
-->
<meta http-equiv="origin-trial" content="AnwB3aSh6U8pmYtO/AzzxELSwk8BRJoj77nUnCq6u3N8LMJKlX/ImydQmXn3SgE0a+8RyowLbV835tXQHJMHuAEAAABQeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQXBwQ2FjaGUiLCAiZXhwaXJ5IjogMTc2MTE3NjE5OH0=">
<script src="/js-test-resources/js-test.js"></script>
<script>
var jsTestIsAsync = true;
description("Test that a manifest served with a wrong signature isn't treated as such.");
function unexpectedEvent(name)
{
testFailed("Unexpected " + name + " event.");
finishJSTest();
}
function test(e)
{
shouldBe("window.applicationCache.status", "applicationCache.UNCACHED");
event = e;
shouldBeEqualToString("event.reason", "signature");
shouldBeEqualToString("event.url", "");
shouldBe("event.status", "0");
shouldBeTrue("'message' in event");
finishJSTest();
}
applicationCache.addEventListener('cached', function() { unexpectedEvent("cached"); }, false);
applicationCache.addEventListener('noupdate', function() { unexpectedEvent("noupdate"); }, false);
applicationCache.addEventListener('error', test, false);
</script>
</body>
</html>