Home | History | Annotate | Download | only in resources
      1 <html manifest="https://127.0.0.1:8443/appcache/resources/different-https-origin-resource.manifest">
      2 <script>
      3 var hadError = false;
      4 var result;
      5 
      6 function finish()
      7 {
      8     if (!hadError)
      9         result = "PASS";
     10     parent.postMessage(result, '*');
     11 }
     12 function fail()
     13 {
     14     result = "FAIL: Different https origin resource is getting downloaded to cache.";
     15     hadError = true;
     16 }
     17 function error()
     18 {
     19     result = "ERROR";
     20     hadError = true;
     21     finish();
     22 }
     23 function progressHandler(e)
     24 {
     25     // The only resource listed in the manifest file is in a different https origin and should be skipped.
     26     if (e.loaded != 0 || e.total != 0)
     27         fail();
     28 }
     29 
     30 applicationCache.onprogress = progressHandler;
     31 applicationCache.onnoupdate = function() { finish(); }
     32 applicationCache.oncached = function() { finish(); }
     33 applicationCache.onerror = function() { error(); }
     34 </script>
     35 </html>
     36