dom/tests/mochitest/ajax/offline/test_offlineIFrame.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/ajax/offline/test_offlineIFrame.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml" manifest="http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest">
     1.5 +<head>
     1.6 +<title>offline iframe test</title>
     1.7 +
     1.8 +<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.9 +<script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script>
    1.10 +<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.11 +
    1.12 +<script type="text/javascript">
    1.13 +
    1.14 +
    1.15 +function checkEntries() {
    1.16 +  var entries = [
    1.17 +    // The manifest itself should be in the cache
    1.18 +    ["http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest", true],
    1.19 +
    1.20 +    // The entries from the manifest should be in the cache
    1.21 +    ["http://mochi.test:8888/tests/SimpleTest/SimpleTest.js", true],
    1.22 +    ["http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js", true]
    1.23 +  ];
    1.24 +  OfflineTest.checkCacheEntries(entries, function() { window.frames["offlineChild"].doneLoading(); });
    1.25 +}
    1.26 +
    1.27 +function childFinished()
    1.28 +{
    1.29 +  OfflineTest.teardownAndFinish();
    1.30 +}
    1.31 +
    1.32 +if (OfflineTest.setup()) {
    1.33 +  applicationCache.onerror = OfflineTest.failEvent;
    1.34 +
    1.35 +  applicationCache.oncached = OfflineTest.priv(checkEntries);
    1.36 +}
    1.37 +
    1.38 +SimpleTest.waitForExplicitFinish();
    1.39 +
    1.40 +</script>
    1.41 +
    1.42 +</head>
    1.43 +
    1.44 +<body>
    1.45 +
    1.46 +<iframe name="offlineChild" src="offlineChild.html"></iframe>
    1.47 +
    1.48 +</body>
    1.49 +</html>

mercurial