Bug 1588295 - Change popup test to use the js feature rather than stackwalk; r=gerald
authorGreg Tatum <gtatum@mozilla.com>
Wed, 23 Oct 2019 14:07:47 +0000
changeset 498720 6b5c158150f9b65088939c41fe2c56ed7efd9cef
parent 498719 d816eaf4e0b111d65bb0fce6fe428b905cef2c40
child 498721 14d6dd504f86d34d7f781caf77ac1205b5d9a0ce
push id98635
push usergtatum@mozilla.com
push dateWed, 23 Oct 2019 14:09:24 +0000
treeherderautoland@6b5c158150f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1588295
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1588295 - Change popup test to use the js feature rather than stackwalk; r=gerald This test is relying on a profiler feature that is not available in every platform. This patch changes it to use the "js" feature, which should be supported everywhere. Differential Revision: https://phabricator.services.mozilla.com/D49948
devtools/client/performance-new/test/xpcshell/test_popup_initial_state.js
--- a/devtools/client/performance-new/test/xpcshell/test_popup_initial_state.js
+++ b/devtools/client/performance-new/test/xpcshell/test_popup_initial_state.js
@@ -27,19 +27,19 @@ add_task(function test() {
     "The initial state has the default buffersize."
   );
   Assert.equal(
     getRecordingPreferencesFromBrowser().interval,
     getDefaultRecordingPreferences().interval,
     "The initial state has the default interval."
   );
   Assert.equal(
-    getRecordingPreferencesFromBrowser().features.includes("stackwalk"),
-    getDefaultRecordingPreferences().features.includes("stackwalk"),
-    "The stackwalk feature is initialized to the default."
+    getRecordingPreferencesFromBrowser().features.includes("js"),
+    getDefaultRecordingPreferences().features.includes("js"),
+    "The js feature is initialized to the default."
   );
   revertRecordingPreferences();
 });
 
 add_task(function test() {
   info(
     "Test that the state and features are properly validated. This ensures that as " +
       "we add and remove features, the stored preferences do not cause the Gecko " +
@@ -47,31 +47,29 @@ add_task(function test() {
   );
   const {
     getRecordingPreferencesFromBrowser,
     setRecordingPreferencesOnBrowser,
     revertRecordingPreferences,
   } = setupBackgroundJsm();
 
   Assert.ok(
-    getRecordingPreferencesFromBrowser().features.includes("stackwalk"),
-    "The stackwalk preference is present initially."
+    getRecordingPreferencesFromBrowser().features.includes("js"),
+    "The js preference is present initially."
   );
 
   const settings = getRecordingPreferencesFromBrowser();
-  settings.features = settings.features.filter(
-    feature => feature !== "stackwalk"
-  );
+  settings.features = settings.features.filter(feature => feature !== "js");
   settings.features.push("UNKNOWN_FEATURE_FOR_TESTS");
   setRecordingPreferencesOnBrowser(settings);
 
   Assert.ok(
     !getRecordingPreferencesFromBrowser().features.includes(
       "UNKNOWN_FEATURE_FOR_TESTS"
     ),
     "The unknown feature is removed."
   );
   Assert.ok(
-    !getRecordingPreferencesFromBrowser().features.includes("stackwalk"),
-    "The stackwalk preference is still flipped from the default."
+    !getRecordingPreferencesFromBrowser().features.includes("js"),
+    "The js preference is still flipped from the default."
   );
   revertRecordingPreferences();
 });