Bug 1140658 - Part 4: Port test_cache_add.html to the new mini-framework; r=bkelly

This commit is contained in:
Ehsan Akhgari 2015-03-06 20:57:05 -05:00
Родитель 9e4efd1206
Коммит 3933a8a97c
2 изменённых файлов: 9 добавлений и 9 удалений

12
dom/cache/test/mochitest/test_cache_add.html поставляемый
Просмотреть файл

@ -6,17 +6,15 @@
<title>Validate Interfaces Exposed to Workers</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript" src="worker_driver.js"></script>
<script type="text/javascript" src="driver.js"></script>
</head>
<body>
<iframe id="frame"></iframe>
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({
"set": [["dom.caches.enabled", true]]
}, function() {
workerTestExec("test_cache_add.js");
});
runTests("test_cache_add.js")
.then(function() {
SimpleTest.finish();
});
</script>
</body>
</html>

6
dom/cache/test/mochitest/test_cache_add.js поставляемый
Просмотреть файл

@ -45,8 +45,10 @@ caches.open('adder').then(function(openCache) {
resultList.every(function(result) {
ok(!!result, 'Responses should now be in cache for each URL.');
});
workerTestDone();
return caches.delete("adder");
}).then(function() {
testDone();
}).catch(function(err) {
ok(false, 'Caught error: ' + err);
workerTestDone();
testDone();
});