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

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

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

@ -6,31 +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() {
var frame = document.getElementById("frame");
frame.src = "test_cache_frame.html";
frame.onload = function() {
var contentWindow = frame.contentWindow;
addEventListener("message", function(evt) {
ok(evt.data.success, "frame should have succeeded");
workerTestExec("test_cache.js");
runTests("test_cache.js")
.then(function() {
SimpleTest.finish();
});
contentWindow.postMessage({
type: "start"
}, "*");
}
});
</script>
</body>
</html>

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

@ -123,5 +123,5 @@ caches.open('snafu').then(function(openCache) {
}).then(function(hasMissingCache) {
ok(!hasMissingCache, 'has should have a result');
}).then(function() {
workerTestDone();
testDone();
})