summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/appcache/resources/different-https-origin-resource.html
blob: 7c24b07f4cb00b15e5e255eb06848550630d307e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<html manifest="https://127.0.0.1:8443/appcache/resources/different-https-origin-resource.manifest">
<script>
var hadError = false;
var result;

function finish()
{
    if (!hadError)
        result = "PASS";
    parent.postMessage(result, '*');
}
function fail()
{
    result = "FAIL: Different https origin resource is getting downloaded to cache.";
    hadError = true;
}
function error()
{
    result = "ERROR";
    hadError = true;
    finish();
}
function progressHandler(e)
{
    // The only resource listed in the manifest file is in a different https origin and should be skipped.
    if (e.loaded != 0 || e.total != 0)
        fail();
}

applicationCache.onprogress = progressHandler;
applicationCache.onnoupdate = function() { finish(); }
applicationCache.oncached = function() { finish(); }
applicationCache.onerror = function() { error(); }
</script>
</html>