зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1343550 - Mochitest. r=baku
MozReview-Commit-ID: 72V86HrbVCl --HG-- extra : rebase_source : 8f561de253021c7566e5d3160bb6b8f43ff0319f extra : intermediate-source : b258ffe9ee50b38cecbd4eb8fb00c02d30f42376 extra : source : 1aa20dad5c31bc1629516af77266266e1074fb26
This commit is contained in:
Родитель
838b5a8cad
Коммит
863a1ccd9e
|
@ -174,6 +174,7 @@ skip-if = toolkit == 'android' # bug 1091965
|
|||
# Android: bug 1061675; OSX 10.6: bug 1097721
|
||||
skip-if = (toolkit == 'android') || (os == 'mac' && os_version == '10.6')
|
||||
[test_nodeToParamConnection.html]
|
||||
[test_nodeCreationDocumentGone.html]
|
||||
[test_OfflineAudioContext.html]
|
||||
[test_offlineDestinationChannelCountLess.html]
|
||||
[test_offlineDestinationChannelCountMore.html]
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test whether we can create an AudioContext interface</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
[ "dom.disable_open_during_load", false ]
|
||||
]
|
||||
}).then(function() {
|
||||
var sub = encodeURI("data:text/html,<!DOCTYPE html>\n"+
|
||||
"<html><script>"+
|
||||
"var context = new AudioContext();"+
|
||||
"setTimeout(function(){window.close();},1000);\x3C/script></html>");
|
||||
window.onload = function(){
|
||||
var a = window.open(sub);
|
||||
a.onbeforeunload = function(){
|
||||
setTimeout(function(){
|
||||
try {
|
||||
a.context.createScriptProcessor(512, 1, 1);
|
||||
} catch(e) {
|
||||
ok (true,"got exception");
|
||||
}
|
||||
setTimeout(function() {
|
||||
ok (true,"no crash");
|
||||
SimpleTest.finish();
|
||||
}, 0);
|
||||
}, 0);
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче