Bug 1449255: Part 14 - Rename test_bug753900 to test_crash_annotation_quoting.js. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Tue, 27 Mar 2018 15:54:45 -0700
changeset 773483 20cad80e076767421768f4fe0305986dc15a2e3c
parent 773482 26ca3e929b0680812a5e5adb5ef5cbdc5cd56058
child 773484 ea518b3b520ef8950aa90180a9c0f9faf4616cbf
push id104243
push usermaglione.k@gmail.com
push dateWed, 28 Mar 2018 00:15:32 +0000
reviewersaswan
bugs1449255, 753900
milestone61.0a1
Bug 1449255: Part 14 - Rename test_bug753900 to test_crash_annotation_quoting.js. r?aswan MozReview-Commit-ID: H0KARZUfGjM
toolkit/mozapps/extensions/test/xpcshell/test_bug753900.js
toolkit/mozapps/extensions/test/xpcshell/test_crash_annotation_quoting.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
rename from toolkit/mozapps/extensions/test/xpcshell/test_bug753900.js
rename to toolkit/mozapps/extensions/test/xpcshell/test_crash_annotation_quoting.js
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug753900.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_crash_annotation_quoting.js
@@ -26,31 +26,23 @@ var addon4 = {
     id: "xpcshell@tests.mozilla.org",
     minVersion: "1",
     maxVersion: "1"
   }]
 };
 
 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
 
-const profileDir = gProfD.clone();
-profileDir.append("extensions");
+add_task(async function run_test() {
+  await promiseStartupManager();
 
-function run_test() {
-  do_test_pending();
-
-  writeInstallRDFForExtension(addon3, profileDir);
-  writeInstallRDFForExtension(addon4, profileDir);
-
-  startupManager();
+  await promiseInstallXPI(addon3);
+  await promiseInstallXPI(addon4);
 
-  AddonManager.getAddonsByIDs(["addon3@tests.mozilla.org",
-                               "addon4@tests.mozilla.org"],
-                               function([a3, a4]) {
+  let [a3, a4] = await AddonManager.getAddonsByIDs(["addon3@tests.mozilla.org",
+                                                    "addon4@tests.mozilla.org"]);
 
-    Assert.notEqual(a3, null);
-    do_check_in_crash_annotation(addon3.id, addon3.version);
-    Assert.notEqual(a4, null);
-    do_check_in_crash_annotation(addon4.id, addon4.version);
+  Assert.notEqual(a3, null);
+  do_check_in_crash_annotation(addon3.id, addon3.version);
 
-    executeSoon(do_test_finished);
-  });
-}
+  Assert.notEqual(a4, null);
+  do_check_in_crash_annotation(addon4.id, addon4.version);
+});
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
@@ -89,24 +89,24 @@ skip-if = os == "win" # Bug 1358846
 # Bug 676992: test consistently fails on Android
 fail-if = os == "android"
 [test_bug619730.js]
 tags = blocklist
 [test_bug620837.js]
 tags = blocklist
 [test_bug655254.js]
 [test_bug740612.js]
-[test_bug753900.js]
 [test_cache_certdb.js]
 run-if = addon_signing
 [test_cacheflush.js]
 [test_childprocess.js]
 [test_compatoverrides.js]
 [test_corrupt.js]
 [test_corruptfile.js]
+[test_crash_annotation_quoting.js]
 [test_db_path.js]
 head =
 [test_default_providers_pref.js]
 [test_delay_update.js]
 [test_delay_update_webextension.js]
 skip-if = appname == "thunderbird"
 tags = webextensions
 [test_dependencies.js]