Bug 1533794 - encodeURI() expected path to account for possible spaces in filename. r=MattN
authorIan Moody <moz-ian@perix.co.uk>
Fri, 08 Mar 2019 19:22:37 +0000
changeset 521222 7e6212df60755c483d031ef1bd30fa484ebb91ca
parent 521221 f6d4e1b012e6580cd2c857dafe12f540f7e87f8e
child 521223 f996bb0f3d232ad13c8d9f87ecbe9baa868ebac2
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1533794
milestone67.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 1533794 - encodeURI() expected path to account for possible spaces in filename. r=MattN Usually the brandName is a single word like "Firefox" or "Nightly" but DevEdition's is "Firefox Developer Edition", so on mozilla-beta the filename can be written with spaces, which GSettings will return percent encoded in a file:// URL so we need to match that. Differential Revision: https://phabricator.services.mozilla.com/D22746
browser/components/shell/test/browser_420786.js
--- a/browser/components/shell/test/browser_420786.js
+++ b/browser/components/shell/test/browser_420786.js
@@ -54,17 +54,17 @@ add_task(async function() {
 
       const prevImage = gsettings.getString(GS_IMAGE_KEY);
       const prevOption = gsettings.getString(GS_OPTION_KEY);
       const prevDrawBG = gsettings.getBoolean(GS_DRAW_BG_KEY);
 
       checkWallpaper = function(position, expectedGSettingsPosition) {
         shell.setDesktopBackground(image, position, "");
         ok(wpFile.exists(), "Wallpaper was written to disk");
-        is(gsettings.getString(GS_IMAGE_KEY), "file://" + wpFile.path,
+        is(gsettings.getString(GS_IMAGE_KEY), encodeURI("file://" + wpFile.path),
           "Wallpaper file GSettings key is correct");
         is(gsettings.getString(GS_OPTION_KEY), expectedGSettingsPosition,
           "Wallpaper position GSettings key is correct");
       };
 
       restoreSettings = function() {
         gsettings.setString(GS_IMAGE_KEY, prevImage);
         gsettings.setString(GS_OPTION_KEY, prevOption);