mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1133185 - Remove nonstandard let blocks from toolkit/webapps. r=myk
This commit is contained in:
parent
d5d0478f4b
commit
b6b4450ba7
@ -82,7 +82,8 @@ let runTest = Task.async(function*() {
|
||||
|
||||
let request = navigator.mozApps.installPackage(app.manifestURL);
|
||||
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
request.onerror = function() {
|
||||
deferred.reject(this.error.name);
|
||||
};
|
||||
@ -93,13 +94,14 @@ let runTest = Task.async(function*() {
|
||||
let appObject = request.result;
|
||||
ok(appObject, "app is non-null");
|
||||
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
appObject.ondownloaderror = function() {
|
||||
deferred.reject(appObject.downloadError.name);
|
||||
};
|
||||
appObject.ondownloadapplied = deferred.resolve;
|
||||
yield deferred.promise;
|
||||
};
|
||||
}
|
||||
|
||||
while (!WebappOSUtils.isLaunchable(app)) {
|
||||
yield wait(1000);
|
||||
|
@ -80,8 +80,10 @@ let runTest = Task.async(function*() {
|
||||
|
||||
confirmNextPopup();
|
||||
|
||||
let (request = navigator.mozApps.installPackage(app.manifestURL)) {
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let request = navigator.mozApps.installPackage(app.manifestURL);
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
request.onerror = function() {
|
||||
deferred.reject(this.error.name);
|
||||
};
|
||||
@ -92,14 +94,15 @@ let runTest = Task.async(function*() {
|
||||
let appObject = request.result;
|
||||
ok(appObject, "app is non-null");
|
||||
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
appObject.ondownloaderror = function() {
|
||||
deferred.reject(appObject.downloadError.name);
|
||||
};
|
||||
appObject.ondownloadapplied = deferred.resolve;
|
||||
yield deferred.promise;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
while (!WebappOSUtils.isLaunchable(app)) {
|
||||
yield wait(1000);
|
||||
@ -112,8 +115,10 @@ let runTest = Task.async(function*() {
|
||||
|
||||
confirmNextPopup();
|
||||
|
||||
let (request = navigator.mozApps.installPackage(app.manifestURL)) {
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let request = navigator.mozApps.installPackage(app.manifestURL);
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
request.onerror = function() {
|
||||
deferred.reject(this.error.name);
|
||||
};
|
||||
@ -124,14 +129,15 @@ let runTest = Task.async(function*() {
|
||||
let appObject = request.result;
|
||||
ok(appObject, "app is non-null");
|
||||
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
appObject.ondownloaderror = function() {
|
||||
deferred.reject(appObject.downloadError.name);
|
||||
};
|
||||
appObject.ondownloadapplied = deferred.resolve;
|
||||
yield deferred.promise;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
while (!WebappOSUtils.isLaunchable(app)) {
|
||||
yield wait(1000);
|
||||
|
@ -62,7 +62,8 @@ let runTest = Task.async(function*() {
|
||||
|
||||
let request = navigator.mozApps.install(app.manifestURL);
|
||||
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
request.onerror = function() {
|
||||
deferred.reject(this.error.name);
|
||||
};
|
||||
|
@ -60,7 +60,8 @@ let runTest = Task.async(function*() {
|
||||
|
||||
let request = navigator.mozApps.install(app.manifestURL);
|
||||
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
request.onerror = function() {
|
||||
deferred.reject(this.error.name);
|
||||
};
|
||||
@ -76,7 +77,8 @@ let runTest = Task.async(function*() {
|
||||
}
|
||||
ok(true, "App launchable");
|
||||
|
||||
let (size = 0) {
|
||||
{
|
||||
let size = 0;
|
||||
do {
|
||||
try {
|
||||
size = yield dirSize(OS.Path.join(testAppInfo.profileDir.path, "OfflineCache"));
|
||||
@ -99,7 +101,8 @@ let runTest = Task.async(function*() {
|
||||
}
|
||||
ok(!appClosed, "App was launched and is still running");
|
||||
|
||||
let (size = 0) {
|
||||
{
|
||||
let size = 0;
|
||||
do {
|
||||
try {
|
||||
size = yield dirSize(OS.Path.join(testAppInfo.cacheDir.path, "OfflineCache"));
|
||||
|
@ -62,7 +62,8 @@ let runTest = Task.async(function*() {
|
||||
|
||||
let request = navigator.mozApps.installPackage(app.manifestURL);
|
||||
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
request.onerror = function() {
|
||||
deferred.reject(this.error.name);
|
||||
};
|
||||
@ -73,13 +74,14 @@ let runTest = Task.async(function*() {
|
||||
let appObject = request.result;
|
||||
ok(appObject, "app is non-null");
|
||||
|
||||
let (deferred = Promise.defer()) {
|
||||
{
|
||||
let deferred = Promise.defer();
|
||||
appObject.ondownloaderror = function() {
|
||||
deferred.reject(appObject.downloadError.name);
|
||||
};
|
||||
appObject.ondownloadapplied = deferred.resolve;
|
||||
yield deferred.promise;
|
||||
};
|
||||
}
|
||||
|
||||
while (!WebappOSUtils.isLaunchable(app)) {
|
||||
yield wait(1000);
|
||||
|
Loading…
Reference in New Issue
Block a user