Back out 069effcd9de6 (bug 1108181) for wpt bustage that shouldn't have happened
authorPhil Ringnalda <philringnalda@gmail.com>
Mon, 19 Oct 2015 21:21:56 -0700
changeset 303642 d630beb006c9969707aa3216365f9fc064fa6205
parent 303641 48fff3ec4d8113bff05b4dd484f2e5a5481f2f9d
child 303643 7dedd0f85f8b1be2230287e73b4906c5b1165996
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1108181
milestone44.0a1
backs out069effcd9de620b46cce83acbe03284e8a1da5a5
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
Back out 069effcd9de6 (bug 1108181) for wpt bustage that shouldn't have happened
dom/fetch/Headers.h
dom/fetch/InternalHeaders.h
dom/tests/mochitest/fetch/test_headers_common.js
dom/webidl/Headers.webidl
testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-match.https.html.ini
testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-put.https.html.ini
testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-storage-match.https.html.ini
--- a/dom/fetch/Headers.h
+++ b/dom/fetch/Headers.h
@@ -97,29 +97,16 @@ public:
     return mInternalHeaders->Has(aName, aRv);
   }
 
   void Set(const nsACString& aName, const nsACString& aValue, ErrorResult& aRv)
   {
     mInternalHeaders->Set(aName, aValue, aRv);
   }
 
-  uint32_t GetIterableLength() const
-  {
-    return mInternalHeaders->GetIterableLength();
-  }
-  const nsString GetKeyAtIndex(unsigned aIndex) const
-  {
-    return mInternalHeaders->GetKeyAtIndex(aIndex);
-  }
-  const nsString GetValueAtIndex(unsigned aIndex) const
-  {
-    return mInternalHeaders->GetValueAtIndex(aIndex);
-  }
-
   // ChromeOnly
   HeadersGuardEnum Guard() const
   {
     return mInternalHeaders->Guard();
   }
 
   void SetGuard(HeadersGuardEnum aGuard, ErrorResult& aRv)
   {
--- a/dom/fetch/InternalHeaders.h
+++ b/dom/fetch/InternalHeaders.h
@@ -68,31 +68,16 @@ public:
               ErrorResult& aRv);
   void Delete(const nsACString& aName, ErrorResult& aRv);
   void Get(const nsACString& aName, nsCString& aValue, ErrorResult& aRv) const;
   void GetAll(const nsACString& aName, nsTArray<nsCString>& aResults,
               ErrorResult& aRv) const;
   bool Has(const nsACString& aName, ErrorResult& aRv) const;
   void Set(const nsACString& aName, const nsACString& aValue, ErrorResult& aRv);
 
-  uint32_t GetIterableLength() const
-  {
-    return mList.Length();
-  }
-  const NS_ConvertASCIItoUTF16 GetKeyAtIndex(unsigned aIndex) const
-  {
-    MOZ_ASSERT(aIndex < mList.Length());
-    return NS_ConvertASCIItoUTF16(mList[aIndex].mName);
-  }
-  const NS_ConvertASCIItoUTF16 GetValueAtIndex(unsigned aIndex) const
-  {
-    MOZ_ASSERT(aIndex < mList.Length());
-    return NS_ConvertASCIItoUTF16(mList[aIndex].mValue);
-  }
-
   void Clear();
 
   HeadersGuardEnum Guard() const { return mGuard; }
   void SetGuard(HeadersGuardEnum aGuard, ErrorResult& aRv);
 
   void Fill(const InternalHeaders& aInit, ErrorResult& aRv);
   void Fill(const Sequence<Sequence<nsCString>>& aInit, ErrorResult& aRv);
   void Fill(const MozMap<nsCString>& aInit, ErrorResult& aRv);
--- a/dom/tests/mochitest/fetch/test_headers_common.js
+++ b/dom/tests/mochitest/fetch/test_headers_common.js
@@ -8,37 +8,26 @@ function shouldThrow(func, expected, msg
     func();
   } catch(e) {
     err = e;
   } finally {
     ok(err instanceof expected, msg);
   }
 }
 
-function recursiveArrayCompare(actual, expected) {
-  is(Array.isArray(actual), Array.isArray(expected), "Both should either be arrays, or not");
-  if (Array.isArray(actual) && Array.isArray(expected)) {
-    var diff = actual.length !== expected.length;
-
-    for (var i = 0, n = actual.length; !diff && i < n; ++i) {
-      diff = recursiveArrayCompare(actual[i], expected[i]);
-    }
-
-    return diff;
-  } else {
-    return actual !== expected;
-  }
-}
-
 function arrayEquals(actual, expected, msg) {
   if (actual === expected) {
     return;
   }
 
-  var diff = recursiveArrayCompare(actual, expected);
+  var diff = actual.length !== expected.length;
+
+  for (var i = 0, n = actual.length; !diff && i < n; ++i) {
+    diff = actual[i] !== expected[i];
+  }
 
   ok(!diff, msg);
   if (diff) {
     is(actual, expected, msg);
   }
 }
 
 function checkHas(headers, name, msg) {
@@ -175,65 +164,13 @@ function TestFilledHeaders() {
   shouldThrow(function() {
     filled = new Headers([
       ["zxy"],
       ["uts", "321"]
     ]);
   }, TypeError, "Fill with non-tuple sequence should throw TypeError.");
 }
 
-function iterate(iter) {
-  var result = [];
-  for (var val = iter.next(); !val.done;) {
-    result.push(val.value);
-    val = iter.next();
-  }
-  return result;
-}
-
-function iterateForOf(iter) {
-  var result = [];
-  for (var value of iter) {
-    result.push(value);
-  }
-  return result;
-}
-
-function byteInflate(str) {
-  var encoder = new TextEncoder("utf-8");
-  var encoded = encoder.encode(str);
-  var result = "";
-  for (var i = 0; i < encoded.length; ++i) {
-    result += String.fromCharCode(encoded[i]);
-  }
-  return result
-}
-
-function TestHeadersIterator() {
-  var ehsanInflated = byteInflate("احسان");
-  var headers = new Headers();
-  headers.set("foo0", "bar0");
-  headers.append("foo", "bar");
-  headers.append("foo", ehsanInflated);
-  headers.append("Foo2", "bar2");
-  headers.set("Foo2", "baz2");
-  headers.set("foo3", "bar3");
-  headers.delete("foo0");
-  headers.delete("foo3");
-
-  var key_iter = headers.keys();
-  var value_iter = headers.values();
-  var entries_iter = headers.entries();
-
-  arrayEquals(iterate(key_iter), ["foo", "foo", "foo2"], "Correct key iterator");
-  arrayEquals(iterate(value_iter), ["bar", ehsanInflated, "baz2"], "Correct value iterator");
-  arrayEquals(iterate(entries_iter), [["foo", "bar"], ["foo", ehsanInflated], ["foo2", "baz2"]], "Correct entries iterator");
-
-  arrayEquals(iterateForOf(headers), [["foo", "bar"], ["foo", ehsanInflated], ["foo2", "baz2"]], "Correct entries iterator");
-  arrayEquals(iterateForOf(new Headers(headers)), [["foo", "bar"], ["foo", ehsanInflated], ["foo2", "baz2"]], "Correct entries iterator");
-}
-
 function runTest() {
   TestEmptyHeaders();
   TestFilledHeaders();
-  TestHeadersIterator();
   return Promise.resolve();
 }
--- a/dom/webidl/Headers.webidl
+++ b/dom/webidl/Headers.webidl
@@ -22,14 +22,13 @@ enum HeadersGuardEnum {
  Exposed=(Window,Worker)]
 interface Headers {
   [Throws] void append(ByteString name, ByteString value);
   [Throws] void delete(ByteString name);
   [Throws] ByteString? get(ByteString name);
   [Throws] sequence<ByteString> getAll(ByteString name);
   [Throws] boolean has(ByteString name);
   [Throws] void set(ByteString name, ByteString value);
-  iterable<ByteString, ByteString>;
 
   // Used to test different guard states from mochitest.
   // Note: Must be set prior to populating headers or will throw.
   [ChromeOnly, SetterThrows] attribute HeadersGuardEnum guard;
 };
--- a/testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-match.https.html.ini
+++ b/testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-match.https.html.ini
@@ -1,4 +1,54 @@
 [cache-match.https.html]
   type: testharness
   prefs: [dom.serviceWorkers.enabled: true, dom.serviceWorkers.interception.enabled: true, dom.serviceWorkers.exemptFromPerDomainMax:true, dom.caches.enabled:true]
+  [Cache.match and Cache.matchAll]
+    bug: https://github.com/w3c/web-platform-tests/issues/2098
 
+  [Cache.matchAll with URL]
+    expected: FAIL
+
+  [Cache.match with URL]
+    expected: FAIL
+
+  [Cache.matchAll with Request]
+    expected: FAIL
+
+  [Cache.match with Request]
+    expected: FAIL
+
+  [Cache.matchAll with new Request]
+    expected: FAIL
+
+  [Cache.match with new Request]
+    expected: FAIL
+
+  [Cache.matchAll with ignoreSearch option (request with no search parameters)]
+    expected: FAIL
+
+  [Cache.match with ignoreSearch option (request with no search parameters)]
+    expected: FAIL
+
+  [Cache.matchAll with ignoreSearch option (request with search parameter)]
+    expected: FAIL
+
+  [Cache.match with ignoreSearch option (request with search parameter)]
+    expected: FAIL
+
+  [Cache.matchAll with URL containing fragment]
+    expected: FAIL
+
+  [Cache.match with URL containing fragment]
+    expected: FAIL
+
+  [Cache.matchAll with responses containing "Vary" header]
+    expected: FAIL
+
+  [Cache.match with responses containing "Vary" header]
+    expected: FAIL
+
+  [Cache.matchAll with "ignoreVary" parameter]
+    expected: FAIL
+
+  [Cache.match with Request and Response objects with different URLs]
+    expected: FAIL
+
--- a/testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-put.https.html.ini
+++ b/testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-put.https.html.ini
@@ -1,4 +1,25 @@
 [cache-put.https.html]
   type: testharness
   prefs: [dom.serviceWorkers.enabled: true, dom.serviceWorkers.interception.enabled: true, dom.serviceWorkers.exemptFromPerDomainMax:true, dom.caches.enabled:true]
+  [Cache.put with request URLs containing embedded credentials]
+    expected: FAIL
+    bug: https://github.com/w3c/web-platform-tests/issues/2098
 
+  [Cache.put called with Request and Response from fetch()]
+    expected: FAIL
+
+  [Cache.put with a Response containing an empty URL]
+    expected: FAIL
+
+  [Cache.put with HTTP 500 response]
+    expected: FAIL
+
+  [Cache.put called twice with matching Requests and different Responses]
+    expected: FAIL
+
+  [Cache.put called twice with request URLs that differ only by a fragment]
+    expected: FAIL
+
+  [Cache.put with a relative URL]
+    expected: FAIL
+
--- a/testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-storage-match.https.html.ini
+++ b/testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-storage-match.https.html.ini
@@ -1,3 +1,15 @@
 [cache-storage-match.https.html]
   type: testharness
   prefs: [dom.serviceWorkers.enabled: true, dom.serviceWorkers.interception.enabled: true, dom.serviceWorkers.exemptFromPerDomainMax:true, dom.caches.enabled:true]
+  [CacheStorageMatch with no cache name provided]
+    expected: FAIL
+
+  [CacheStorageMatch from one of many caches]
+    expected: FAIL
+
+  [CacheStorageMatch from one of many caches by name]
+    expected: FAIL
+
+  [CacheStorageMatch a string request]
+    expected: FAIL
+