mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1025994 - Rewrite webapps-manage test. r=baku
This commit is contained in:
parent
d8308a6217
commit
ec6592dfaa
@ -21,7 +21,13 @@ TestData.prototype = {
|
||||
return null;
|
||||
}
|
||||
|
||||
var obj = window.navigator[this.obj];
|
||||
// split on . to allow nested props
|
||||
var props = this.obj.split(".");
|
||||
var obj = window.navigator;
|
||||
|
||||
for (var i = 0; i < props.length && obj !== undefined; i++) {
|
||||
obj = obj[props[i]];
|
||||
}
|
||||
|
||||
if ((this.webidl && obj instanceof window[this.webidl]) ||
|
||||
(this.idl && obj instanceof SpecialPowers.Ci[this.idl])) {
|
||||
|
@ -16,24 +16,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=815105
|
||||
<pre id="test">
|
||||
<script type="application/javascript;version=1.8" src="file_framework.js"></script>
|
||||
<script type="application/javascript;version=1.8">
|
||||
function verifier(success, failure) {
|
||||
try {
|
||||
var req = window.navigator.mozApps.mgmt.getAll();
|
||||
req.onsuccess = function() {
|
||||
success("Got mgmt");
|
||||
}
|
||||
req.onerror = function() {
|
||||
failure("Got error");
|
||||
}
|
||||
} catch (e) {
|
||||
failure("Got exception " + e);
|
||||
}
|
||||
}
|
||||
|
||||
var gData = [
|
||||
{
|
||||
perm: ["webapps-manage"],
|
||||
verifier: verifier.toSource(),
|
||||
obj: "mozApps.mgmt",
|
||||
idl: "mozIDOMApplicationMgmt",
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user