Bug 1502375 - FilePropertyBag should inherit BlobPropertyBag, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Sat, 27 Oct 2018 10:26:31 +0200
changeset 443249 3155ef9756f19489937c120abd22dee80c9e09b8
parent 443248 1cf243201204ea1c447de6bbef144eb9a2130cdb
child 443250 70a836b4b6a1dd0c999f5e26d187617530a7b607
push id34947
push userdluca@mozilla.com
push dateSat, 27 Oct 2018 21:53:25 +0000
treeherdermozilla-central@6d7686f1082f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1502375
milestone65.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 1502375 - FilePropertyBag should inherit BlobPropertyBag, r=smaug
dom/file/File.cpp
dom/webidl/File.webidl
testing/web-platform/meta/FileAPI/file/File-constructor-endings.html.ini
--- a/dom/file/File.cpp
+++ b/dom/file/File.cpp
@@ -132,17 +132,17 @@ File::Constructor(const GlobalObject& aG
   // Normalizing the filename
   nsString name(aName);
   name.ReplaceChar('/', ':');
 
   RefPtr<MultipartBlobImpl> impl = new MultipartBlobImpl(name);
 
   nsAutoString type(aBag.mType);
   MakeValidBlobType(type);
-  impl->InitializeBlob(aData, type, false, aRv);
+  impl->InitializeBlob(aData, type, aBag.mEndings == EndingTypes::Native, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
   MOZ_ASSERT(impl->IsFile());
 
   if (aBag.mLastModified.WasPassed()) {
     impl->SetLastModified(aBag.mLastModified.Value());
   }
--- a/dom/webidl/File.webidl
+++ b/dom/webidl/File.webidl
@@ -14,18 +14,17 @@ interface nsIFile;
  Exposed=(Window,Worker)]
 interface File : Blob {
   readonly attribute DOMString name;
 
   [GetterThrows]
   readonly attribute long long lastModified;
 };
 
-dictionary FilePropertyBag {
-  DOMString type = "";
+dictionary FilePropertyBag : BlobPropertyBag {
   long long lastModified;
 };
 
 dictionary ChromeFilePropertyBag : FilePropertyBag {
   DOMString name = "";
   boolean existenceCheck = true;
 };
 
deleted file mode 100644
--- a/testing/web-platform/meta/FileAPI/file/File-constructor-endings.html.ini
+++ /dev/null
@@ -1,95 +0,0 @@
-[File-constructor-endings.html]
-  [Invalid "endings" value: null]
-    expected: FAIL
-
-  [Invalid "endings" value: ""]
-    expected: FAIL
-
-  [Invalid "endings" value: "invalidEnumValue"]
-    expected: FAIL
-
-  [Invalid "endings" value: "Transparent"]
-    expected: FAIL
-
-  [Invalid "endings" value: "NATIVE"]
-    expected: FAIL
-
-  [Invalid "endings" value: 0]
-    expected: FAIL
-
-  [Invalid "endings" value: {}]
-    expected: FAIL
-
-  [Exception propagation from options]
-    expected: FAIL
-
-  [The "endings" options property is used]
-    expected: FAIL
-
-  [Input LF with endings 'native']
-    expected:
-      if debug and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and not e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-      if debug and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-
-  [Input CR with endings 'native']
-    expected: FAIL
-
-  [Input CRLF with endings 'native']
-    expected:
-      if not debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-      if debug and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-
-  [Input CRCR with endings 'native']
-    expected: FAIL
-
-  [Input LFCR with endings 'native']
-    expected: FAIL
-
-  [Input LFLF with endings 'native']
-    expected:
-      if debug and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and not e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-      if debug and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-
-  [Input CRCRLF with endings 'native']
-    expected: FAIL
-
-  [Input CRLFLF with endings 'native']
-    expected: FAIL
-
-  [Input CRLFCR with endings 'native']
-    expected:
-      if not debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-      if debug and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-
-  [Input CRLFCRLF with endings 'native']
-    expected:
-      if not debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-      if debug and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-
-  [Input LFCRLFCR with endings 'native']
-    expected: FAIL
-
-  [CR/LF in adjacent input strings]
-    expected: FAIL
-