Bug 1047483 - patch 6 - Fixes for Webplatform tests, r=bz
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 08 Oct 2014 17:15:23 +0100
changeset 209369 b72ab356368f6fd4868ff81a023736a8c9d01d0c
parent 209368 1d38e11a4dc411373fbd7a4ff7e56a3c88deee87
child 209370 0cb0d9df5a8ef984bb47fb479c7727cebd838e1b
push id27615
push userkwierso@gmail.com
push dateWed, 08 Oct 2014 23:37:42 +0000
treeherdermozilla-central@7b16babf6a73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1047483
milestone35.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 1047483 - patch 6 - Fixes for Webplatform tests, r=bz
dom/indexedDB/test/unit/test_temporary_storage.js
dom/ipc/Blob.cpp
dom/ipc/BlobParent.h
testing/web-platform/meta/FileAPI/Blob-constructor.html.ini
testing/web-platform/meta/FileAPI/idlharness.html.ini
--- a/dom/indexedDB/test/unit/test_temporary_storage.js
+++ b/dom/indexedDB/test/unit/test_temporary_storage.js
@@ -206,17 +206,17 @@ function testSteps()
 
   checkUsage(3);
   yield undefined;
 
   info("Stage 4");
 
   let trans = db.transaction(["foo"], "readwrite");
 
-  let blob = Blob(["bar"]);
+  let blob = new Blob(["bar"]);
   request = trans.objectStore("foo").add(blob, 42);
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
   event = yield undefined;
 
   trans.oncomplete = grabEventAndContinueHandler;
   event = yield undefined;
 
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -456,18 +456,21 @@ public:
     if (!mBlobImpl) {
       return NS_BASE_STREAM_CLOSED;
     }
 
     // Otherwise fake it...
     NS_WARNING("Available() called before real stream has been delivered, "
                "guessing the amount of data available!");
 
-    rv = mBlobImpl->GetSize(aAvailable);
-    NS_ENSURE_SUCCESS(rv, rv);
+    ErrorResult error;
+    *aAvailable = mBlobImpl->GetSize(error);
+    if (NS_WARN_IF(error.Failed())) {
+      return error.ErrorCode();
+    }
 
     return NS_OK;
   }
 
   NS_IMETHOD
   Read(char* aBuffer, uint32_t aCount, uint32_t* aResult) MOZ_OVERRIDE
   {
     nsresult rv = BlockAndWaitForStream();
--- a/dom/ipc/BlobParent.h
+++ b/dom/ipc/BlobParent.h
@@ -102,17 +102,17 @@ public:
          const ParentBlobConstructorParams& aParams);
 
   static void
   Destroy(PBlobParent* aActor)
   {
     delete static_cast<BlobParent*>(aActor);
   }
 
-  static already_AddRefed<DOMFileImpl>
+  static already_AddRefed<FileImpl>
   GetBlobImplForID(const nsID& aID);
 
   bool
   HasManager() const
   {
     return mBackgroundManager || mContentManager;
   }
 
--- a/testing/web-platform/meta/FileAPI/Blob-constructor.html.ini
+++ b/testing/web-platform/meta/FileAPI/Blob-constructor.html.ini
@@ -1,25 +1,22 @@
 [Blob-constructor.html]
   type: testharness
   [Blob interface object]
     expected: FAIL
 
+  [no-argument Blob constructor without 'new']
+    expected: FAIL
+
   [A plain object should be treated as a sequence for the blobParts argument.]
     expected: FAIL
 
   [A plain object with a length property should be treated as a sequence for the blobParts argument.]
     expected: FAIL
 
-  [A String object should be treated as a sequence for the blobParts argument.]
-    expected: FAIL
-
-  [A Uint8Array object should be treated as a sequence for the blobParts argument.]
-    expected: FAIL
-
   [The length getter should be invoked and any exceptions should be propagated.]
     expected: FAIL
 
   [A platform object that supports indexed properties should be treated as a sequence for the blobParts argument (overwritten \'length\'.)]
     expected: FAIL
 
   [ToUint32 should be applied to the length and any exceptions should be propagated.]
     expected: FAIL
@@ -31,40 +28,37 @@
     expected: FAIL
 
   [Passing an platform object that supports indexed properties as the blobParts array should work (window).]
     expected: FAIL
 
   [Passing an platform object that supports indexed properties as the blobParts array should work (window with custom toString).]
     expected: FAIL
 
-  [Passing an platform object that supports indexed properties as the blobParts array should work (select).]
-    expected: FAIL
-
   [Passing a platform array object as the blobParts array should work (MessagePort[\]).]
     expected: FAIL
 
-  [Passing a platform array object as the blobParts array should work (Attr[\]).]
-    expected: FAIL
-
   [The \'endings\' property should be ignored.]
     expected: FAIL
 
-  [Arguments should be evaluated from left to right.]
-    expected: FAIL
-
   [Passing object "/regex/" (index 4) for options should use the defaults.]
     expected: FAIL
 
   [Passing object "/regex/" (index 4) for options should use the defaults (with newlines).]
     expected: FAIL
 
   [Newlines should not change when endings is \'native\'.]
     expected: FAIL
 
+  [Changes to the blobParts array should be reflected in the returned Blob (pop).]
+    expected: FAIL
+
+  [Changes to the blobParts array should be reflected in the returned Blob (unshift).]
+    expected: FAIL
+
   [Blob with type "A"]
     expected: FAIL
 
   [Blob with type "TEXT/HTML"]
     expected: FAIL
 
   [Blob with type "\xc3\xa5"]
     expected: FAIL
--- a/testing/web-platform/meta/FileAPI/idlharness.html.ini
+++ b/testing/web-platform/meta/FileAPI/idlharness.html.ini
@@ -1,55 +1,25 @@
 [idlharness.html]
   type: testharness
   [URL interface: operation createFor(Blob)]
     expected: FAIL
 
-  [Blob interface: existence and properties of interface object]
-    expected: FAIL
-
-  [Blob interface object length]
-    expected: FAIL
-
-  [Blob interface: existence and properties of interface prototype object]
-    expected: FAIL
-
-  [Blob interface: existence and properties of interface prototype object\'s "constructor" property]
-    expected: FAIL
-
-  [Blob interface: attribute size]
-    expected: FAIL
-
-  [Blob interface: attribute type]
-    expected: FAIL
-
-  [Blob interface: operation slice(long long,long long,DOMString)]
-    expected: FAIL
-
   [Blob interface: operation close()]
     expected: FAIL
 
   [Blob interface: [object Blob\] must inherit property "close" with the proper type (3)]
     expected: FAIL
 
   [File interface: existence and properties of interface object]
     expected: FAIL
 
   [File interface object length]
     expected: FAIL
 
-  [File interface: existence and properties of interface prototype object]
-    expected: FAIL
-
-  [File interface: existence and properties of interface prototype object\'s "constructor" property]
-    expected: FAIL
-
-  [File interface: attribute name]
-    expected: FAIL
-
   [File interface: attribute lastModifiedDate]
     expected: FAIL
 
   [FileReader interface: existence and properties of interface object]
     expected: FAIL
 
   [Stringification of [object Blob @ 0x99f5c4f0 (native @ 0x99fcc6a0)\]]
     expected: FAIL
@@ -195,32 +165,26 @@
     expected: FAIL
 
   [Blob interface: new Blob(["TEST"\]) must inherit property "isClosed" with the proper type (2)]
     expected: FAIL
 
   [Blob interface: new Blob(["TEST"\]) must inherit property "close" with the proper type (4)]
     expected: FAIL
 
-  [File interface: attribute lastModified]
-    expected: FAIL
-
   [Stringification of new File(["myFileBits"\], "myFileName")]
     expected:
       if debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
       if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
       if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86") and (bits == 32): FAIL
       if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
       if debug and (os == "mac") and (version == "OS X 10.6.8") and (processor == "x86_64") and (bits == 64): FAIL
       if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
       if debug and (os == "mac") and (version == "OS X 10.9") and (processor == "x86_64") and (bits == 64): FAIL
 
-  [File interface: new File(["myFileBits"\], "myFileName") must inherit property "lastModified" with the proper type (1)]
-    expected: FAIL
-
   [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "isClosed" with the proper type (2)]
     expected: FAIL
 
   [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "close" with the proper type (4)]
     expected: FAIL
 
   [FileReaderSync interface: existence and properties of interface object]
     expected: FAIL