зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1140658 - Part 3: Port test_cache.html to the new mini-framework; r=bkelly
This commit is contained in:
Родитель
fc378c5b91
Коммит
9e4efd1206
|
@ -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>
|
||||
|
|
|
@ -123,5 +123,5 @@ caches.open('snafu').then(function(openCache) {
|
|||
}).then(function(hasMissingCache) {
|
||||
ok(!hasMissingCache, 'has should have a result');
|
||||
}).then(function() {
|
||||
workerTestDone();
|
||||
testDone();
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче