mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 19:07:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
73
dom/tests/mochitest/ajax/offline/test_bug445544.html
Normal file
73
dom/tests/mochitest/ajax/offline/test_bug445544.html
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<html manifest="445544.cacheManifest">
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=445544
|
||||
-->
|
||||
|
||||
<head>
|
||||
<title>Test for Bug 445544</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var gTestWin;
|
||||
var gTimeoutId;
|
||||
|
||||
function finish()
|
||||
{
|
||||
gTestWin.close();
|
||||
OfflineTest.teardownAndFinish();
|
||||
}
|
||||
|
||||
function error()
|
||||
{
|
||||
OfflineTest.ok(false, "Part 2 did not successfully load.");
|
||||
finish();
|
||||
}
|
||||
|
||||
function part2loaded()
|
||||
{
|
||||
clearTimeout(gTimeoutId);
|
||||
OfflineTest.ok(true, "Part 2 successfully loaded.");
|
||||
finish();
|
||||
}
|
||||
|
||||
function part1loaded(appCacheStatus)
|
||||
{
|
||||
OfflineTest.ok(appCacheStatus > 0,
|
||||
"Part 1 successfully loaded from the application cache.");
|
||||
|
||||
// Loading part 2 (which is not part of that application
|
||||
// cache) should succeed...
|
||||
gTestWin.location = "445544_part2.html";
|
||||
|
||||
// We won't be notified if the page fails to load, fail this test
|
||||
// in 10 seconds.
|
||||
gTimeoutId = setTimeout(error, 10000);
|
||||
}
|
||||
|
||||
function manifestUpdated()
|
||||
{
|
||||
// Open a new window that will be associated with this application
|
||||
// cache. This will call part1loaded().
|
||||
gTestWin = window.open("445544_part1.html");
|
||||
}
|
||||
|
||||
if (OfflineTest.setup()) {
|
||||
applicationCache.onerror = OfflineTest.failEvent;
|
||||
applicationCache.oncached = OfflineTest.priv(manifestUpdated);
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.requestFlakyTimeout("untriaged");
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue