Bug 1497722 - Reset locale after test. r=Felipe
authorMichael Kaply <mozilla@kaply.com>
Wed, 10 Oct 2018 21:56:55 +0000
changeset 499076 3dcdff5c8b38cddf416c3a062c48c1619b119a6f
parent 499075 c8ac5fc2e323999eefcb33ee1bb39db27ed3f0a2
child 499077 9697308cfe0008833329e2c20851854c0ff8a113
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe
bugs1497722
milestone64.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 1497722 - Reset locale after test. r=Felipe Differential Revision: https://phabricator.services.mozilla.com/D8273
browser/components/enterprisepolicies/tests/browser/browser_policy_locale.js
--- a/browser/components/enterprisepolicies/tests/browser/browser_policy_locale.js
+++ b/browser/components/enterprisepolicies/tests/browser/browser_policy_locale.js
@@ -18,16 +18,18 @@ function promiseLocaleChanged() {
         }
       },
     };
     Services.obs.addObserver(localeObserver, REQ_LOC_CHANGE_EVENT);
   });
 }
 
 add_task(async function test_requested_locale() {
+  let originalLocales = Services.locale.requestedLocales;
   let localePromise = promiseLocaleChanged();
   await setupPolicyEngineWithJson({
     "policies": {
       "RequestedLocales": ["de"],
     },
   });
   await localePromise;
+  Services.locale.requestedLocales = originalLocales;
 });