Backed out 3 changesets (bug 1389251) for browser-chrome failure on browser/base/content/test/pageinfo/browser_pageinfo_image_info.js. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Fri, 15 Jun 2018 06:18:04 +0300
changeset 479351 9ca74dd454400190188c6646cf94441f198bbc24
parent 479350 c5c9371e1527ac814503222f80bd6f4983eed373
child 479352 0f848f76f6e75bd99e3d56f5fff046efb516d2a0
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1389251
milestone62.0a1
backs outa76a3251a9d242186b5de495e4388e56390b8fc8
c6baebf7b34cc0befd68d2f08658cac4668d1f32
6e89a11ae28ef7c50f0a91132a3ed5ce3fe61c65
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
Backed out 3 changesets (bug 1389251) for browser-chrome failure on browser/base/content/test/pageinfo/browser_pageinfo_image_info.js. CLOSED TREE Backed out changeset a76a3251a9d2 (bug 1389251) Backed out changeset c6baebf7b34c (bug 1389251) Backed out changeset 6e89a11ae28e (bug 1389251)
browser/components/sessionstore/test/browser_formdata.js
devtools/client/webconsole/test/mochitest/browser_webconsole_context_menu_copy_entire_message.js
dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
dom/url/tests/test_url.html
netwerk/base/nsSimpleURI.cpp
netwerk/protocol/http/InterceptedHttpChannel.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpDigestAuth.cpp
netwerk/test/unit/test_URIs.js
testing/web-platform/meta/fetch/data-urls/processing.any.js.ini
testing/web-platform/meta/url/url-constructor.html.ini
xpcom/io/nsEscape.cpp
xpcom/io/nsEscape.h
xpcom/tests/gtest/TestEscape.cpp
--- a/browser/components/sessionstore/test/browser_formdata.js
+++ b/browser/components/sessionstore/test/browser_formdata.js
@@ -57,17 +57,17 @@ add_task(async function test_formdata() 
 });
 
 /**
  * This test ensures that a malicious website can't trick us into restoring
  * form data into a wrong website and that we always check the stored URL
  * before doing so.
  */
 add_task(async function test_url_check() {
-  const URL = "data:text/html;charset=utf-8,<input id=input>";
+  const URL = "data:text/html;charset=utf-8,<input%20id=input>";
   const VALUE = "value-" + Math.random();
 
   // Create a tab with an iframe containing an input field.
   let tab = BrowserTestUtils.addTab(gBrowser, URL);
   let browser = tab.linkedBrowser;
   await promiseBrowserLoaded(browser);
 
   // Restore a tab state with a given form data url.
@@ -99,17 +99,17 @@ add_task(async function test_url_check()
 add_task(async function test_nested() {
   const URL = "data:text/html;charset=utf-8," +
               "<iframe src='data:text/html;charset=utf-8," +
               "<input autofocus=true>'/>";
 
   const FORM_DATA = {
     children: [{
       xpath: {"/xhtml:html/xhtml:body/xhtml:input": "m"},
-      url: "data:text/html;charset=utf-8,<input autofocus=true>"
+      url: "data:text/html;charset=utf-8,<input%20autofocus=true>"
     }]
   };
 
   // Create a tab with an iframe containing an input field.
   let tab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, URL);
   let browser = tab.linkedBrowser;
   await promiseBrowserLoaded(browser);
 
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_context_menu_copy_entire_message.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_context_menu_copy_entire_message.js
@@ -12,17 +12,17 @@ const LOG_FORMAT_WITH_TIMESTAMP = /^[\d:
 const LOG_FORMAT_WITHOUT_TIMESTAMP = /^.+ (\d+ )?.+:\d+$/;
 // RegExp that validates copied text for stacktrace lines.
 const TRACE_FORMAT = /^\t.+ .+:\d+:\d+$/;
 
 const PREF_MESSAGE_TIMESTAMP = "devtools.webconsole.timestampMessages";
 
 const TEST_URI = `data:text/html;charset=utf-8,<script>
   window.logStuff = function () {
-    console.log("simple " +  "text message");
+    console.log("simple text message");
     function wrapper() {
       console.trace();
     }
     wrapper();
   };
 </script>`;
 
 // Test the Copy menu item of the webconsole copies the expected clipboard text for
@@ -44,29 +44,29 @@ add_task(async function() {
 
   info("Test copy menu item for the simple log");
   let message = await waitFor(() => findMessage(hud, "simple text message"));
   let clipboardText = await copyMessageContent(hud, message);
   ok(true, "Clipboard text was found and saved");
 
   info("Check copied text for simple log message");
   let lines = clipboardText.split("\n");
-  is(lines.length, 2, "There are 2 lines in the copied text");
+  ok(lines.length, 2, "There are 2 lines in the copied text");
   is(lines[1], "", "The last line is an empty new line");
   ok(LOG_FORMAT_WITH_TIMESTAMP.test(lines[0]),
     "Log line has the right format:\n" + lines[0]);
 
   info("Test copy menu item for the stack trace message");
   message = await waitFor(() => findMessage(hud, "console.trace"));
   clipboardText = await copyMessageContent(hud, message);
   ok(true, "Clipboard text was found and saved");
 
   info("Check copied text for stack trace message");
   lines = clipboardText.split("\n");
-  is(lines.length, 4, "There are 4 lines in the copied text");
+  ok(lines.length, 4, "There are 4 lines in the copied text");
   is(lines[3], "", "The last line is an empty new line");
   ok(LOG_FORMAT_WITH_TIMESTAMP.test(lines[0]),
     "Log line has the right format:\n" + lines[0]);
   ok(TRACE_FORMAT.test(lines[1]), "Stacktrace line has the right format:\n" + lines[1]);
   ok(TRACE_FORMAT.test(lines[2]), "Stacktrace line has the right format:\n" + lines[2]);
 
   info("Test copy menu item without timestamp");
 
@@ -76,29 +76,29 @@ add_task(async function() {
 
   info("Test copy menu item for the simple log");
   message = await waitFor(() => findMessage(hud, "simple text message"));
   clipboardText = await copyMessageContent(hud, message);
   ok(true, "Clipboard text was found and saved");
 
   info("Check copied text for simple log message");
   lines = clipboardText.split("\n");
-  is(lines.length, 2, "There are 2 lines in the copied text");
+  ok(lines.length, 2, "There are 2 lines in the copied text");
   is(lines[1], "", "The last line is an empty new line");
   ok(LOG_FORMAT_WITHOUT_TIMESTAMP.test(lines[0]),
     "Log line has the right format:\n" + lines[0]);
 
   info("Test copy menu item for the stack trace message");
   message = await waitFor(() => findMessage(hud, "console.trace"));
   clipboardText = await copyMessageContent(hud, message);
   ok(true, "Clipboard text was found and saved");
 
   info("Check copied text for stack trace message");
   lines = clipboardText.split("\n");
-  is(lines.length, 4, "There are 4 lines in the copied text");
+  ok(lines.length, 4, "There are 4 lines in the copied text");
   is(lines[3], "", "The last line is an empty new line");
   ok(LOG_FORMAT_WITHOUT_TIMESTAMP.test(lines[0]),
     "Log line has the right format:\n" + lines[0]);
   ok(TRACE_FORMAT.test(lines[1]), "Stacktrace line has the right format:\n" + lines[1]);
   ok(TRACE_FORMAT.test(lines[2]), "Stacktrace line has the right format:\n" + lines[2]);
 
   observer.destroy();
   Services.prefs.clearUserPref(PREF_MESSAGE_TIMESTAMP);
--- a/dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
+++ b/dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
@@ -388,17 +388,17 @@ SpeechDispatcherService::Setup()
   spd_set_notification_on(mSpeechdClient, SPD_CANCEL);
 
   if (list != NULL) {
     for (int i = 0; list[i]; i++) {
       nsAutoString uri;
 
       uri.AssignLiteral(URI_PREFIX);
       nsAutoCString name;
-      NS_EscapeURL(list[i]->name, -1, esc_OnlyNonASCII | esc_Spaces | esc_AlwaysCopy, name);
+      NS_EscapeURL(list[i]->name, -1, esc_OnlyNonASCII | esc_AlwaysCopy, name);
       uri.Append(NS_ConvertUTF8toUTF16(name));;
       uri.AppendLiteral("?");
 
       nsAutoCString lang(list[i]->language);
 
       if (strcmp(list[i]->variant, "none") != 0) {
         // In speech dispatcher, the variant will usually be the locale subtag
         // with another, non-standard suptag after it. We keep the first one
--- a/dom/url/tests/test_url.html
+++ b/dom/url/tests/test_url.html
@@ -474,17 +474,17 @@
     url.hash = "newhash";
     is(url.href, "scheme:path?query#newhash");
     url.search = "";
     is(url.href, "scheme:path#newhash");
 
     // we don't implement a spec-compliant parser yet.
     // make sure we are bug compatible with existing implementations.
     url = new URL("data:text/html,<a href=\"http://example.org/?q\">Link</a>");
-    is(url.href, "data:text/html,<a href=\"http://example.org/?q\">Link</a>");
+    is(url.href, "data:text/html,<a%20href=\"http://example.org/?q\">Link</a>");
   </script>
 
   <script>
     var u = new URL('http://www.example.org');
     ok(u.toJSON(), 'http://www.example.org', "URL.toJSON()");
     is(JSON.stringify(u), "\"http://www.example.org/\"", "JSON.stringify(u) works");
   </script>
 </body>
--- a/netwerk/base/nsSimpleURI.cpp
+++ b/netwerk/base/nsSimpleURI.cpp
@@ -507,17 +507,17 @@ nsSimpleURI::GetRef(nsACString &result)
 }
 
 // NOTE: SetRef("") removes our ref, whereas SetRef("#") sets it to the empty
 // string (and will result in .spec and .path having a terminal #).
 nsresult
 nsSimpleURI::SetRef(const nsACString &aRef)
 {
     nsAutoCString ref;
-    nsresult rv = NS_EscapeURL(aRef, esc_OnlyNonASCII | esc_Spaces, ref, fallible);
+    nsresult rv = NS_EscapeURL(aRef, esc_OnlyNonASCII, ref, fallible);
     if (NS_FAILED(rv)) {
         return rv;
     }
 
     if (ref.IsEmpty()) {
         // Empty string means to remove ref completely.
         mIsRefValid = false;
         mRef.Truncate(); // invariant: mRef should be empty when it's not valid
--- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
+++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
@@ -180,17 +180,17 @@ InterceptedHttpChannel::FollowSyntheticR
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoCString location;
   rv = mResponseHead->GetHeader(nsHttp::Location, location);
   NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
 
   // make sure non-ASCII characters in the location header are escaped.
   nsAutoCString locationBuf;
-  if (NS_EscapeURL(location.get(), -1, esc_OnlyNonASCII | esc_Spaces, locationBuf)) {
+  if (NS_EscapeURL(location.get(), -1, esc_OnlyNonASCII, locationBuf)) {
     location = locationBuf;
   }
 
   nsCOMPtr<nsIURI> redirectURI;
   rv = ioService->NewURI(nsDependentCString(location.get()),
                          nullptr,
                          mURI,
                          getter_AddRefs(redirectURI));
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -987,17 +987,17 @@ nsHttpChannel::SetupTransaction()
 
     // This is the normal e2e H1 path syntax "/index.html"
     rv = mURI->GetPathQueryRef(path);
     if (NS_FAILED(rv)) {
         return rv;
     }
 
     // path may contain UTF-8 characters, so ensure that they're escaped.
-    if (NS_EscapeURL(path.get(), path.Length(), esc_OnlyNonASCII | esc_Spaces, buf)) {
+    if (NS_EscapeURL(path.get(), path.Length(), esc_OnlyNonASCII, buf)) {
         requestURI = &buf;
     } else {
         requestURI = &path;
     }
 
     // trim off the #ref portion if any...
     int32_t ref1 = requestURI->FindChar('#');
     if (ref1 != kNotFound) {
@@ -5498,17 +5498,17 @@ nsHttpChannel::AsyncProcessRedirection(u
 
     // if a location header was not given, then we can't perform the redirect,
     // so just carry on as though this were a normal response.
     if (NS_FAILED(mResponseHead->GetHeader(nsHttp::Location, location)))
         return NS_ERROR_FAILURE;
 
     // make sure non-ASCII characters in the location header are escaped.
     nsAutoCString locationBuf;
-    if (NS_EscapeURL(location.get(), -1, esc_OnlyNonASCII | esc_Spaces, locationBuf))
+    if (NS_EscapeURL(location.get(), -1, esc_OnlyNonASCII, locationBuf))
         location = locationBuf;
 
     mRedirectType = redirectType;
 
     LOG(("redirecting to: %s [redirection-limit=%u]\n",
         location.get(), uint32_t(mRedirectionLimit)));
 
     nsresult rv = CreateNewURI(location.get(), getter_AddRefs(mRedirectURI));
--- a/netwerk/protocol/http/nsHttpDigestAuth.cpp
+++ b/netwerk/protocol/http/nsHttpDigestAuth.cpp
@@ -107,17 +107,17 @@ nsHttpDigestAuth::GetMethodAndPath(nsIHt
           //
           // make sure we escape any UTF-8 characters in the URI path.  the
           // digest auth uri attribute needs to match the request-URI.
           //
           // XXX we should really ask the HTTP channel for this string
           // instead of regenerating it here.
           //
           nsAutoCString buf;
-          rv = NS_EscapeURL(path, esc_OnlyNonASCII | esc_Spaces, buf, mozilla::fallible);
+          rv = NS_EscapeURL(path, esc_OnlyNonASCII, buf, mozilla::fallible);
           if (NS_SUCCEEDED(rv)) {
             path = buf;
           }
         }
       }
     }
   }
   return rv;
--- a/netwerk/test/unit/test_URIs.js
+++ b/netwerk/test/unit/test_URIs.js
@@ -48,28 +48,22 @@ var gTests = [
     ref:     "",
     nsIURL:  false, nsINestedURI: false },
   { spec:    "data:text/html;charset=utf-8,<html>\r\n\t</html>",
     scheme:  "data",
     prePath: "data:",
     pathQueryRef: "text/html;charset=utf-8,<html></html>",
     ref:     "",
     nsIURL:  false, nsINestedURI: false },
-  { spec:    "data:text/plain,hello%20world",
+  { spec:    "data:text/plain,hello world",
     scheme:  "data",
     prePath: "data:",
     pathQueryRef: "text/plain,hello%20world",
     ref:     "",
     nsIURL:  false, nsINestedURI: false },
-  { spec:    "data:text/plain,hello world",
-    scheme:  "data",
-    prePath: "data:",
-    pathQueryRef: "text/plain,hello world",
-    ref:     "",
-    nsIURL:  false, nsINestedURI: false },
   { spec:    "file:///dir/afile",
     scheme:  "data",
     prePath: "data:",
     pathQueryRef: "text/plain,2",
     ref:     "",
     relativeURI: "data:te\nxt/plain,2",
     nsIURL:  false, nsINestedURI: false },
   { spec:    "file://",
@@ -195,17 +189,17 @@ var gTests = [
     scheme:  "mailto",
     prePath: "mailto:",
     pathQueryRef: "webmaster@mozilla.com",
     ref:     "",
     nsIURL:  false, nsINestedURI: false },
   { spec:    "javascript:new Date()",
     scheme:  "javascript",
     prePath: "javascript:",
-    pathQueryRef: "new Date()",
+    pathQueryRef: "new%20Date()",
     ref:     "",
     nsIURL:  false, nsINestedURI: false },
   { spec:    "blob:123456",
     scheme:  "blob",
     prePath: "blob:",
     pathQueryRef: "123456",
     ref:     "",
     nsIURL:  false, nsINestedURI: false, immutable: true },
@@ -589,36 +583,21 @@ function check_nested_mutations()
   uri1 = gIoService.newURI("view-source:about:blank?query#ref");
   uri2 = gIoService.newURI("view-source:about:blank");
   uri3 = uri1.mutate().setPathQueryRef("blank").finalize();
   do_check_uri_eq(uri3, uri2);
   uri3 = uri2.mutate().setPathQueryRef("blank?query#ref").finalize();
   do_check_uri_eq(uri3, uri1);
 }
 
-function check_space_escaping()
-{
-  let uri = gIoService.newURI("data:text/plain,hello%20world#space hash");
-  Assert.equal(uri.spec, "data:text/plain,hello%20world#space%20hash");
-  uri = gIoService.newURI("data:text/plain,hello%20world#space%20hash");
-  Assert.equal(uri.spec, "data:text/plain,hello%20world#space%20hash");
-  uri = gIoService.newURI("data:text/plain,hello world#space%20hash");
-  Assert.equal(uri.spec, "data:text/plain,hello world#space%20hash");
-  uri = gIoService.newURI("data:text/plain,hello world#space hash");
-  Assert.equal(uri.spec, "data:text/plain,hello world#space%20hash");
-  uri = gIoService.newURI("http://example.com/test path#test path");
-  uri = gIoService.newURI("http://example.com/test%20path#test%20path");
-}
-
 // TEST MAIN FUNCTION
 // ------------------
 function run_test()
 {
   check_nested_mutations();
-  check_space_escaping();
 
   // UTF-8 check - From bug 622981
   // ASCII
   let base = gIoService.newURI("http://example.org/xenia?");
   let resolved = gIoService.newURI("?x", null, base);
   let expected = gIoService.newURI("http://example.org/xenia?x");
   do_info("Bug 662981: ACSII - comparing " + resolved.spec + " and " + expected.spec);
   Assert.ok(resolved.equals(expected));
--- a/testing/web-platform/meta/fetch/data-urls/processing.any.js.ini
+++ b/testing/web-platform/meta/fetch/data-urls/processing.any.js.ini
@@ -1,15 +1,18 @@
 [processing.any.html]
   ["data://test/,X"]
     expected: FAIL
 
   ["data://test:test/,X"]
     expected: FAIL
 
+  ["data:text/plain ,X"]
+    expected: FAIL
+
   ["data:;x=x;charset=x,X"]
     expected: FAIL
 
   ["data:;x=x,X"]
     expected: FAIL
 
   ["data:IMAGE/gif;hi=x,%C2%B1"]
     expected: FAIL
@@ -21,16 +24,19 @@
     expected: FAIL
 
   ["data:\\0,%FF"]
     expected: FAIL
 
   ["data:%00,%FF"]
     expected: FAIL
 
+  ["data:text/html  ,X"]
+    expected: FAIL
+
   ["data:text / html,X"]
     expected: FAIL
 
   ["data:†,X"]
     expected: FAIL
 
   ["data:X,X"]
     expected: FAIL
@@ -104,16 +110,19 @@
 
 [processing.any.worker.html]
   ["data://test/,X"]
     expected: FAIL
 
   ["data://test:test/,X"]
     expected: FAIL
 
+  ["data:text/plain ,X"]
+    expected: FAIL
+
   ["data:;x=x;charset=x,X"]
     expected: FAIL
 
   ["data:;x=x,X"]
     expected: FAIL
 
   ["data:IMAGE/gif;hi=x,%C2%B1"]
     expected: FAIL
@@ -125,16 +134,19 @@
     expected: FAIL
 
   ["data:\\0,%FF"]
     expected: FAIL
 
   ["data:%00,%FF"]
     expected: FAIL
 
+  ["data:text/html  ,X"]
+    expected: FAIL
+
   ["data:text / html,X"]
     expected: FAIL
 
   ["data:†,X"]
     expected: FAIL
 
   ["data:X,X"]
     expected: FAIL
--- a/testing/web-platform/meta/url/url-constructor.html.ini
+++ b/testing/web-platform/meta/url/url-constructor.html.ini
@@ -1,9 +1,12 @@
 [url-constructor.html]
+  [Parsing: <a:\t foo.com> against <http://example.org/foo/bar>]
+    expected: FAIL
+
   [Parsing: <foo://> against <http://example.org/foo/bar>]
     expected: FAIL
 
   [Parsing: <http::@c:29> against <http://example.org/foo/bar>]
     expected: FAIL
 
   [Parsing: <http://::@c@d:2> against <http://example.org/foo/bar>]
     expected: FAIL
@@ -207,16 +210,19 @@
     expected: FAIL
 
   [Parsing: <http://256.256.256.256> against <http://other.com/>]
     expected: FAIL
 
   [Parsing: <..> against <file:///C:/>]
     expected: FAIL
 
+  [Parsing: <lolscheme:x x#x x> against <about:blank>]
+    expected: FAIL
+
   [Parsing: <file://example:1/> against <about:blank>]
     expected: FAIL
 
   [Parsing: <file://example:test/> against <about:blank>]
     expected: FAIL
 
   [Parsing: <file://example%/> against <about:blank>]
     expected: FAIL
--- a/xpcom/io/nsEscape.cpp
+++ b/xpcom/io/nsEscape.cpp
@@ -314,17 +314,16 @@ T_EscapeURL(const typename T::char_type*
     return NS_ERROR_INVALID_ARG;
   }
 
   bool forced = !!(aFlags & esc_Forced);
   bool ignoreNonAscii = !!(aFlags & esc_OnlyASCII);
   bool ignoreAscii = !!(aFlags & esc_OnlyNonASCII);
   bool writing = !!(aFlags & esc_AlwaysCopy);
   bool colon = !!(aFlags & esc_Colon);
-  bool spaces = !!(aFlags & esc_Spaces);
 
   auto src = reinterpret_cast<const unsigned_char_type*>(aPart);
 
   typename T::char_type tempBuffer[100];
   unsigned int tempBufferPos = 0;
 
   bool previousIsNonASCII = false;
   for (size_t i = 0; i < aPartLen; ++i) {
@@ -352,22 +351,22 @@ T_EscapeURL(const typename T::char_type*
     // And, we will not escape non-ascii characters if requested.
     // On special request we will also escape the colon even when
     // not covered by the matrix.
     // ignoreAscii is not honored for control characters (C0 and DEL)
     //
     // And, we should escape the '|' character when it occurs after any
     // non-ASCII character as it may be aPart of a multi-byte character.
     //
-    // 0x20..0x7e are the valid ASCII characters.
+    // 0x20..0x7e are the valid ASCII characters. We also escape spaces
+    // (0x20) since they are not legal in URLs.
     if ((dontNeedEscape(c, aFlags) || (c == HEX_ESCAPE && !forced)
          || (c > 0x7f && ignoreNonAscii)
-         || (c >= 0x20 && c < 0x7f && ignoreAscii))
+         || (c > 0x20 && c < 0x7f && ignoreAscii))
         && !(c == ':' && colon)
-        && !(c == ' ' && spaces)
         && !(previousIsNonASCII && c == '|' && !ignoreNonAscii)) {
       if (writing) {
         tempBuffer[tempBufferPos++] = c;
       }
     } else { /* do the escape magic */
       if (!writing) {
         if (!aResult.Append(aPart, i, mozilla::fallible)) {
           return NS_ERROR_OUT_OF_MEMORY;
--- a/xpcom/io/nsEscape.h
+++ b/xpcom/io/nsEscape.h
@@ -88,18 +88,17 @@ enum EscapeMask {
   esc_Minimal        = esc_Scheme | esc_Username | esc_Password | esc_Host | esc_FilePath | esc_Param | esc_Query | esc_Ref,
   esc_Forced         = 1u << 10, /* forces escaping of existing escape sequences */
   esc_OnlyASCII      = 1u << 11, /* causes non-ascii octets to be skipped */
   esc_OnlyNonASCII   = 1u << 12, /* causes _graphic_ ascii octets (0x20-0x7E)
                                     * to be skipped when escaping. causes all
                                     * ascii octets (<= 0x7F) to be skipped when unescaping */
   esc_AlwaysCopy     = 1u << 13, /* copy input to result buf even if escaping is unnecessary */
   esc_Colon          = 1u << 14, /* forces escape of colon */
-  esc_SkipControl    = 1u << 15, /* skips C0 and DEL from unescaping */
-  esc_Spaces         = 1u << 16  /* forces escape of spaces */
+  esc_SkipControl    = 1u << 15  /* skips C0 and DEL from unescaping */
 };
 
 /**
  * NS_EscapeURL
  *
  * Escapes invalid char's in an URL segment.  Has no side-effect if the URL
  * segment is already escaped, unless aFlags has the esc_Forced bit in which
  * case % will also be escaped.  Iff some part of aStr is escaped is the
--- a/xpcom/tests/gtest/TestEscape.cpp
+++ b/xpcom/tests/gtest/TestEscape.cpp
@@ -128,24 +128,8 @@ TEST(Escape, nsAppendEscapedHTML)
   nsCString dst;
   for (size_t i = 0; i < ArrayLength(srcs); i++) {
     nsCString src(srcs[i]);
     nsAppendEscapedHTML(src, dst);
     ASSERT_TRUE(dst.Equals(dsts2[i]));
   }
 }
 
-TEST(Escape, EscapeSpaces)
-{
-  // Tests the fallible version of NS_EscapeURL works as expected when no
-  // escaping is necessary.
-  nsCString toEscape("data:\x0D\x0A spa ces\xC4\x9F");
-  nsCString escaped;
-  nsresult rv = NS_EscapeURL(toEscape, esc_OnlyNonASCII, escaped, fallible);
-  EXPECT_EQ(rv, NS_OK);
-  // Only non-ASCII and C0
-  EXPECT_STREQ(escaped.BeginReading(), "data:%0D%0A spa ces%C4%9F");
-
-  escaped.Truncate();
-  rv = NS_EscapeURL(toEscape, esc_OnlyNonASCII | esc_Spaces, escaped, fallible);
-  EXPECT_EQ(rv, NS_OK);
-  EXPECT_STREQ(escaped.BeginReading(), "data:%0D%0A%20spa%20ces%C4%9F");
-}