WebKit Bugzilla
Attachment 360365 Details for
Bug 182325
: Align with Fetch on data: URLs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-182325-20190128222249.patch (text/plain), 31.17 KB, created by
Rob Buis
on 2019-01-28 13:22:50 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2019-01-28 13:22:50 PST
Size:
31.17 KB
patch
obsolete
>Subversion Revision: 240591 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6d76ee4fd7759156c57f451d08f23be1abeb8a8f..5c5e3e6165b0ef7bde5a3ec9ffd480dff15e2093 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,36 @@ >+2019-01-28 Rob Buis <rbuis@igalia.com> >+ >+ Align with Fetch on data: URLs >+ https://bugs.webkit.org/show_bug.cgi?id=182325 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implement most remaining steps for data: URL processing [1]. >+ Serialization is still to be implemented. >+ >+ To make the code in DataURLDecoder::parseMediaType more efficient, >+ refactor ParsedContentType so that validation and parsing is done >+ in one pass. >+ >+ Test: web-platform-tests/fetch/data-urls/processing.any.js >+ >+ [1] https://fetch.spec.whatwg.org/#data-urls >+ >+ * Modules/encryptedmedia/CDM.cpp: >+ (WebCore::CDM::getSupportedCapabilitiesForAudioVideoType): >+ * platform/network/DataURLDecoder.cpp: >+ (WebCore::DataURLDecoder::parseMediaType): >+ (WebCore::DataURLDecoder::DecodeTask::process): >+ * platform/network/ParsedContentType.cpp: >+ (WebCore::ParsedContentType::parseContentType): >+ (WebCore::ParsedContentType::create): >+ (WebCore::isValidContentType): >+ (WebCore::ParsedContentType::ParsedContentType): >+ (WebCore::DummyParsedContentType::setContentType const): Deleted. >+ (WebCore::DummyParsedContentType::setContentTypeParameter const): Deleted. >+ (WebCore::parseContentType): Deleted. >+ * platform/network/ParsedContentType.h: >+ > 2019-01-28 Rob Buis <rbuis@igalia.com> > > Update MIME type parser >diff --git a/Source/WebCore/Modules/encryptedmedia/CDM.cpp b/Source/WebCore/Modules/encryptedmedia/CDM.cpp >index ebf067f7b57f16c330b5d740438834222efabd8f..40119c8e2e60b0885ade07cdbd2771534c609cda 100644 >--- a/Source/WebCore/Modules/encryptedmedia/CDM.cpp >+++ b/Source/WebCore/Modules/encryptedmedia/CDM.cpp >@@ -433,12 +433,12 @@ Optional<Vector<MediaKeySystemMediaCapability>> CDM::getSupportedCapabilitiesFor > return WTF::nullopt; > > // 3.4. If content type is an invalid or unrecognized MIME type, continue to the next iteration. >- if (!isValidContentType(requestedCapability.contentType, Mode::Rfc2045)) >+ Optional<ParsedContentType> contentType = ParsedContentType::create(requestedCapability.contentType, Mode::Rfc2045); >+ if (!contentType) > continue; > > // 3.5. Let container be the container type specified by content type. >- ParsedContentType contentType { requestedCapability.contentType }; >- String container = contentType.mimeType(); >+ String container = contentType->mimeType(); > > // 3.6. If the user agent does not support container, continue to the next iteration. The case-sensitivity > // of string comparisons is determined by the appropriate RFC. >@@ -446,8 +446,8 @@ Optional<Vector<MediaKeySystemMediaCapability>> CDM::getSupportedCapabilitiesFor > // 3.8. If the user agent does not recognize one or more parameters, continue to the next iteration. > // 3.9. Let media types be the set of codecs and codec constraints specified by parameters. The case-sensitivity > // of string comparisons is determined by the appropriate RFC or other specification. >- String codecs = contentType.parameterValueForName("codecs"); >- if (contentType.parameterCount() > (codecs.isEmpty() ? 0 : 1)) >+ String codecs = contentType->parameterValueForName("codecs"); >+ if (contentType->parameterCount() > (codecs.isEmpty() ? 0 : 1)) > continue; > > // 3.10. If media types is empty: >@@ -467,7 +467,7 @@ Optional<Vector<MediaKeySystemMediaCapability>> CDM::getSupportedCapabilitiesFor > // combination of container, media types, robustness and local accumulated configuration in combination > // with restrictions: > MediaEngineSupportParameters parameters; >- parameters.type = ContentType(contentType.mimeType()); >+ parameters.type = ContentType(contentType->mimeType()); > if (!MediaPlayer::supportsType(parameters)) { > // Try with Media Source: > parameters.isMediaSource = true; >diff --git a/Source/WebCore/platform/network/DataURLDecoder.cpp b/Source/WebCore/platform/network/DataURLDecoder.cpp >index 59ddf074a5f32c50a1b76cd10dec88bcac851de7..b02c8d931d4719bce87ebfab89923c1ad3a560f8 100644 >--- a/Source/WebCore/platform/network/DataURLDecoder.cpp >+++ b/Source/WebCore/platform/network/DataURLDecoder.cpp >@@ -28,6 +28,7 @@ > > #include "DecodeEscapeSequences.h" > #include "HTTPParsers.h" >+#include "ParsedContentType.h" > #include "SharedBuffer.h" > #include "TextEncoding.h" > #include <wtf/MainThread.h> >@@ -47,18 +48,9 @@ static WorkQueue& decodeQueue() > > static Result parseMediaType(const String& mediaType) > { >- auto mimeType = extractMIMETypeFromMediaType(mediaType); >- auto charset = extractCharsetFromMediaType(mediaType); >- >- // https://tools.ietf.org/html/rfc2397 >- // If <mediatype> is omitted, it defaults to text/plain;charset=US-ASCII. As a shorthand, >- // "text/plain" can be omitted but the charset parameter supplied. >- if (mimeType.isEmpty()) { >- mimeType = "text/plain"_s; >- if (charset.isEmpty()) >- charset = "US-ASCII"_s; >- } >- return { mimeType, charset, !mediaType.isEmpty() ? mediaType : "text/plain;charset=US-ASCII", nullptr }; >+ if (Optional<ParsedContentType> parsedContentType = ParsedContentType::create(mediaType)) >+ return { parsedContentType->mimeType(), parsedContentType->charset(), mediaType, nullptr }; >+ return { "text/plain"_s, "US-ASCII"_s, "text/plain;charset=US-ASCII"_s, nullptr }; > } > > struct DecodeTask { >@@ -87,6 +79,9 @@ public: > auto header = StringView(urlString).substring(strlen(dataString), headerEnd - strlen(dataString)); > isBase64 = header.endsWithIgnoringASCIICase(StringView(base64String)); > auto mediaType = (isBase64 ? header.substring(0, header.length() - strlen(base64String)) : header).toString(); >+ mediaType = mediaType.stripWhiteSpace(); >+ if (mediaType.startsWith(';')) >+ mediaType.insert("text/plain", 0); > result = parseMediaType(mediaType); > > return true; >diff --git a/Source/WebCore/platform/network/ParsedContentType.cpp b/Source/WebCore/platform/network/ParsedContentType.cpp >index 67a433ce575a5925f87893e5317a2038a65ca77f..d75fc2abe69869a7e449751eb8903e58df03e694 100644 >--- a/Source/WebCore/platform/network/ParsedContentType.cpp >+++ b/Source/WebCore/platform/network/ParsedContentType.cpp >@@ -36,12 +36,6 @@ > > namespace WebCore { > >-class DummyParsedContentType { >-public: >- void setContentType(const SubstringRange&, Mode) const { } >- void setContentTypeParameter(const String&, const String&, Mode) const { } >-}; >- > static void skipSpaces(const String& input, unsigned& startIndex) > { > while (startIndex < input.length() && input[startIndex] == ' ') >@@ -189,47 +183,48 @@ static bool isNotSemicolonOrEqualSign(UChar ch) > return ch != ';' && ch != '='; > } > >-template <class ReceiverType> >-bool parseContentType(const String& contentType, ReceiverType& receiver, Mode mode) >+bool ParsedContentType::parseContentType(Mode mode) > { >+ if (m_contentType.contains('\r') || m_contentType.contains('\n')) >+ return false; > unsigned index = 0; >- unsigned contentTypeLength = contentType.length(); >- skipSpaces(contentType, index); >+ unsigned contentTypeLength = m_contentType.length(); >+ skipSpaces(m_contentType, index); > if (index >= contentTypeLength) { >- LOG_ERROR("Invalid Content-Type string '%s'", contentType.ascii().data()); >+ LOG_ERROR("Invalid Content-Type string '%s'", m_contentType.ascii().data()); > return false; > } > > unsigned contentTypeStart = index; >- auto typeRange = parseToken(contentType, index, isNotForwardSlash, mode); >- if (!typeRange || containsNonTokenCharacters(contentType, *typeRange)) { >+ auto typeRange = parseToken(m_contentType, index, isNotForwardSlash, mode); >+ if (!typeRange || containsNonTokenCharacters(m_contentType, *typeRange)) { > LOG_ERROR("Invalid Content-Type, invalid type value."); > return false; > } > >- if (contentType[index++] != '/') { >+ if (m_contentType[index++] != '/') { > LOG_ERROR("Invalid Content-Type, missing '/'."); > return false; > } > >- auto subTypeRange = parseToken(contentType, index, isNotSemicolon, mode, mode == Mode::MimeSniff); >- if (!subTypeRange || containsNonTokenCharacters(contentType, *subTypeRange)) { >+ auto subTypeRange = parseToken(m_contentType, index, isNotSemicolon, mode, mode == Mode::MimeSniff); >+ if (!subTypeRange || containsNonTokenCharacters(m_contentType, *subTypeRange)) { > LOG_ERROR("Invalid Content-Type, invalid subtype value."); > return false; > } > > // There should not be any quoted strings until we reach the parameters. >- size_t semiColonIndex = contentType.find(';', contentTypeStart); >+ size_t semiColonIndex = m_contentType.find(';', contentTypeStart); > if (semiColonIndex == notFound) { >- receiver.setContentType(SubstringRange(contentTypeStart, contentTypeLength - contentTypeStart), mode); >+ setContentType(SubstringRange(contentTypeStart, contentTypeLength - contentTypeStart), mode); > return true; > } > >- receiver.setContentType(SubstringRange(contentTypeStart, semiColonIndex - contentTypeStart), mode); >+ setContentType(SubstringRange(contentTypeStart, semiColonIndex - contentTypeStart), mode); > index = semiColonIndex + 1; > while (true) { >- skipSpaces(contentType, index); >- auto keyRange = parseToken(contentType, index, isNotSemicolonOrEqualSign, mode); >+ skipSpaces(m_contentType, index); >+ auto keyRange = parseToken(m_contentType, index, isNotSemicolonOrEqualSign, mode); > if (mode == Mode::Rfc2045 && (!keyRange || index >= contentTypeLength)) { > LOG_ERROR("Invalid Content-Type parameter name."); > return false; >@@ -237,31 +232,31 @@ bool parseContentType(const String& contentType, ReceiverType& receiver, Mode mo > > // Should we tolerate spaces here? > if (mode == Mode::Rfc2045) { >- if (contentType[index++] != '=' || index >= contentTypeLength) { >+ if (m_contentType[index++] != '=' || index >= contentTypeLength) { > LOG_ERROR("Invalid Content-Type malformed parameter."); > return false; > } > } else { > if (index >= contentTypeLength) > break; >- if (contentType[index] != '=' && contentType[index] != ';') { >+ if (m_contentType[index] != '=' && m_contentType[index] != ';') { > LOG_ERROR("Invalid Content-Type malformed parameter."); > return false; > } >- if (contentType[index++] == ';') >+ if (m_contentType[index++] == ';') > continue; > } > >- String parameterName = substringForRange(contentType, *keyRange); >+ String parameterName = substringForRange(m_contentType, *keyRange); > > // Should we tolerate spaces here? > Optional<SubstringRange> valueRange; >- if (contentType[index] == '"') { >- valueRange = parseQuotedString(contentType, index, mode); >+ if (m_contentType[index] == '"') { >+ valueRange = parseQuotedString(m_contentType, index, mode); > if (mode == Mode::MimeSniff) >- parseToken(contentType, index, isNotSemicolon, mode); >+ parseToken(m_contentType, index, isNotSemicolon, mode); > } else >- valueRange = parseToken(contentType, index, isNotSemicolon, mode, mode == Mode::MimeSniff); >+ valueRange = parseToken(m_contentType, index, isNotSemicolon, mode, mode == Mode::MimeSniff); > > if (!valueRange) { > if (mode == Mode::MimeSniff) >@@ -270,14 +265,14 @@ bool parseContentType(const String& contentType, ReceiverType& receiver, Mode mo > return false; > } > >- String parameterValue = substringForRange(contentType, *valueRange); >+ String parameterValue = substringForRange(m_contentType, *valueRange); > // Should we tolerate spaces here? >- if (mode == Mode::Rfc2045 && index < contentTypeLength && contentType[index++] != ';') { >+ if (mode == Mode::Rfc2045 && index < contentTypeLength && m_contentType[index++] != ';') { > LOG_ERROR("Invalid Content-Type, invalid character at the end of key/value parameter."); > return false; > } > >- receiver.setContentTypeParameter(parameterName, parameterValue, mode); >+ setContentTypeParameter(parameterName, parameterValue, mode); > > if (index >= contentTypeLength) > return true; >@@ -286,19 +281,22 @@ bool parseContentType(const String& contentType, ReceiverType& receiver, Mode mo > return true; > } > >-bool isValidContentType(const String& contentType, Mode mode) >+Optional<ParsedContentType> ParsedContentType::create(const String& contentType, Mode mode) > { >- if (contentType.contains('\r') || contentType.contains('\n')) >- return false; >+ ParsedContentType parsedContentType(mode == Mode::Rfc2045 ? contentType : contentType.stripWhiteSpace()); >+ if (!parsedContentType.parseContentType(mode)) >+ return WTF::nullopt; >+ return parsedContentType; >+} > >- DummyParsedContentType parsedContentType = DummyParsedContentType(); >- return parseContentType<DummyParsedContentType>(contentType, parsedContentType, mode); >+bool isValidContentType(const String& contentType, Mode mode) >+{ >+ return ParsedContentType::create(contentType, mode) != WTF::nullopt; > } > >-ParsedContentType::ParsedContentType(const String& contentType, Mode mode) >- : m_contentType(contentType.stripWhiteSpace()) >+ParsedContentType::ParsedContentType(const String& contentType) >+ : m_contentType(contentType) > { >- parseContentType<ParsedContentType>(m_contentType, *this, mode); > } > > String ParsedContentType::charset() const >diff --git a/Source/WebCore/platform/network/ParsedContentType.h b/Source/WebCore/platform/network/ParsedContentType.h >index 949010b7270c7c7045fc2ab0ba5c35496dc0dd79..03383084115501c1848ad51bfa6a642b400f5680 100644 >--- a/Source/WebCore/platform/network/ParsedContentType.h >+++ b/Source/WebCore/platform/network/ParsedContentType.h >@@ -47,7 +47,7 @@ WEBCORE_EXPORT bool isValidContentType(const String&, Mode = Mode::MimeSniff); > // FIXME: add support for comments. > class ParsedContentType { > public: >- explicit ParsedContentType(const String&, Mode = Mode::MimeSniff); >+ static Optional<ParsedContentType> create(const String&, Mode = Mode::MimeSniff); > > String mimeType() const { return m_mimeType; } > String charset() const; >@@ -57,8 +57,8 @@ public: > size_t parameterCount() const; > > private: >- template<class ReceiverType> >- friend bool parseContentType(const String&, ReceiverType&, Mode); >+ ParsedContentType(const String&); >+ bool parseContentType(Mode); > void setContentType(const SubstringRange&, Mode); > void setContentTypeParameter(const String&, const String&, Mode); > >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index caabb42cf5d3fd22d5144cb080ebf382b27acddc..7a38ef7b97d9b2d7c72dffee00e572fc2d2dfda8 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-28 Rob Buis <rbuis@igalia.com> >+ >+ Align with Fetch on data: URLs >+ https://bugs.webkit.org/show_bug.cgi?id=182325 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Update improved test expectations. >+ >+ * web-platform-tests/fetch/data-urls/processing.any-expected.txt: >+ * web-platform-tests/fetch/data-urls/processing.any.worker-expected.txt: >+ * web-platform-tests/xhr/overridemimetype-blob-expected.txt: >+ > 2019-01-28 Rob Buis <rbuis@igalia.com> > > Update MIME type parser >diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any-expected.txt >index c878ab6750bc237125f850d9691c7086a25eb590..43984861a146b8a29e23c0bf9916df49b9ffba8a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any-expected.txt >@@ -3,7 +3,7 @@ CONSOLE MESSAGE: Fetch API cannot load data:text/html. > CONSOLE MESSAGE: Fetch API cannot load data:text/html ;charset=x. > > PASS Setup. >-FAIL "data://test/,X" assert_equals: expected "text/plain;charset=US-ASCII" but got "//test/" >+PASS "data://test/,X" > PASS "data://test:test/,X" > PASS "data:,X" > PASS "data:" >@@ -13,30 +13,30 @@ PASS "data:," > FAIL "data:,X#X" assert_array_equals: lengths differ, expected 1 got 3 > PASS "data:,%FF" > PASS "data:text/plain,X" >-FAIL "data:text/plain ,X" assert_equals: expected (string) "text/plain" but got (object) null >+PASS "data:text/plain ,X" > PASS "data:text/plain%20,X" > FAIL "data:text/plain\f,X" assert_equals: expected "text/plain%0c" but got "text/plain%0C" > FAIL "data:text/plain%0C,X" assert_equals: expected "text/plain%0c" but got "text/plain%0C" > FAIL "data:text/plain;,X" assert_equals: expected "text/plain" but got "text/plain;" >-FAIL "data:;x=x;charset=x,X" assert_equals: expected "text/plain;x=x;charset=x" but got ";x=x;charset=x" >-FAIL "data:;x=x,X" assert_equals: expected "text/plain;x=x" but got ";x=x" >+PASS "data:;x=x;charset=x,X" >+PASS "data:;x=x,X" > PASS "data:text/plain;charset=windows-1252,%C2%B1" > FAIL "data:text/plain;Charset=UTF-8,%C2%B1" assert_equals: expected "text/plain;charset=UTF-8" but got "text/plain;Charset=UTF-8" > PASS "data:image/gif,%C2%B1" > FAIL "data:IMAGE/gif,%C2%B1" assert_equals: expected "image/gif" but got "IMAGE/gif" > FAIL "data:IMAGE/gif;hi=x,%C2%B1" assert_equals: expected "image/gif;hi=x" but got "IMAGE/gif;hi=x" > FAIL "data:IMAGE/gif;CHARSET=x,%C2%B1" assert_equals: expected "image/gif;charset=x" but got "IMAGE/gif;CHARSET=x" >-FAIL "data: ,%FF" assert_equals: expected (string) "text/plain;charset=US-ASCII" but got (object) null >-FAIL "data:%20,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%20" >-FAIL "data:\f,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%0C" >-FAIL "data:%1F,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%1F" >-FAIL "data:\0,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%00" >-FAIL "data:%00,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%00" >-FAIL "data:text/html ,X" assert_equals: expected (string) "text/html" but got (object) null >-FAIL "data:text / html,X" assert_equals: expected "text/plain;charset=US-ASCII" but got "text / html" >-FAIL "data:â ,X" assert_equals: expected "text/plain;charset=US-ASCII" but got "%E2%80%A0" >+PASS "data: ,%FF" >+PASS "data:%20,%FF" >+PASS "data:\f,%FF" >+PASS "data:%1F,%FF" >+PASS "data:\0,%FF" >+PASS "data:%00,%FF" >+PASS "data:text/html ,X" >+PASS "data:text / html,X" >+PASS "data:â ,X" > FAIL "data:â /â ,X" assert_equals: expected "%e2%80%a0/%e2%80%a0" but got "%E2%80%A0/%E2%80%A0" >-FAIL "data:X,X" assert_equals: expected "text/plain;charset=US-ASCII" but got "X" >+PASS "data:X,X" > PASS "data:image/png,X X" > PASS "data:application/javascript,X X" > PASS "data:application/xml,X X" >@@ -45,32 +45,32 @@ PASS "data:text/plain,X X" > PASS "data:unknown/unknown,X X" > FAIL "data:text/plain;a=\",\",X" assert_equals: expected "text/plain;a=\"\"" but got "text/plain;a=\"" > PASS "data:text/plain;a=%2C,X" >-FAIL "data:;base64;base64,WA" assert_equals: expected "text/plain" but got ";base64" >+FAIL "data:;base64;base64,WA" assert_equals: expected "text/plain" but got "text/plain;base64" > FAIL "data:x/x;base64;base64,WA" assert_equals: expected "x/x" but got "x/x;base64" > FAIL "data:x/x;base64;charset=x,WA" assert_equals: expected "x/x;charset=x" but got "x/x;base64;charset=x" > FAIL "data:x/x;base64;charset=x;base64,WA" assert_equals: expected "x/x;charset=x" but got "x/x;base64;charset=x" > FAIL "data:x/x;base64;base64x,WA" assert_equals: expected "x/x" but got "x/x;base64;base64x" > PASS "data:;base64,W%20A" > PASS "data:;base64,W%0CA" >-FAIL "data:x;base64x,WA" assert_equals: expected "text/plain;charset=US-ASCII" but got "x;base64x" >-FAIL "data:x;base64;x,WA" assert_equals: expected "text/plain;charset=US-ASCII" but got "x;base64;x" >-FAIL "data:x;base64=x,WA" assert_equals: expected "text/plain;charset=US-ASCII" but got "x;base64=x" >+PASS "data:x;base64x,WA" >+PASS "data:x;base64;x,WA" >+PASS "data:x;base64=x,WA" > FAIL "data:; base64,WA" assert_array_equals: lengths differ, expected 1 got 2 > FAIL "data:; base64,WA" assert_array_equals: lengths differ, expected 1 got 2 > FAIL "data: ;charset=x ; base64,WA" assert_array_equals: lengths differ, expected 1 got 2 >-FAIL "data:;base64;,WA" assert_equals: expected "text/plain" but got ";base64;" >+FAIL "data:;base64;,WA" assert_equals: expected "text/plain" but got "text/plain;base64;" > FAIL "data:;base64 ,WA" assert_array_equals: lengths differ, expected 1 got 2 > FAIL "data:;base64 ,WA" assert_array_equals: lengths differ, expected 1 got 2 >-FAIL "data:;base 64,WA" assert_equals: expected "text/plain" but got ";base 64" >+FAIL "data:;base 64,WA" assert_equals: expected "text/plain" but got "text/plain;base 64" > PASS "data:;BASe64,WA" >-FAIL "data:;%62ase64,WA" assert_equals: expected "text/plain" but got ";%62ase64" >-FAIL "data:%3Bbase64,WA" assert_equals: expected "text/plain;charset=US-ASCII" but got "%3Bbase64" >-FAIL "data:;charset=x,X" assert_equals: expected "text/plain;charset=x" but got ";charset=x" >-FAIL "data:; charset=x,X" assert_equals: expected "text/plain;charset=x" but got "; charset=x" >-FAIL "data:;charset =x,X" assert_equals: expected "text/plain" but got ";charset =x" >-FAIL "data:;charset= x,X" assert_equals: expected "text/plain;charset=\" x\"" but got ";charset= x" >-FAIL "data:;charset=,X" assert_equals: expected "text/plain" but got ";charset=" >-FAIL "data:;charset,X" assert_equals: expected "text/plain" but got ";charset" >-FAIL "data:;charset=\"x\",X" assert_equals: expected "text/plain;charset=x" but got ";charset=\"x\"" >-FAIL "data:;CHARSET=\"X\",X" assert_equals: expected "text/plain;charset=X" but got ";CHARSET=\"X\"" >+FAIL "data:;%62ase64,WA" assert_equals: expected "text/plain" but got "text/plain;%62ase64" >+PASS "data:%3Bbase64,WA" >+PASS "data:;charset=x,X" >+FAIL "data:; charset=x,X" assert_equals: expected "text/plain;charset=x" but got "text/plain; charset=x" >+FAIL "data:;charset =x,X" assert_equals: expected "text/plain" but got "text/plain;charset =x" >+FAIL "data:;charset= x,X" assert_equals: expected "text/plain;charset=\" x\"" but got "text/plain;charset= x" >+FAIL "data:;charset=,X" assert_equals: expected "text/plain" but got "text/plain;charset=" >+FAIL "data:;charset,X" assert_equals: expected "text/plain" but got "text/plain;charset" >+FAIL "data:;charset=\"x\",X" assert_equals: expected "text/plain;charset=x" but got "text/plain;charset=\"x\"" >+FAIL "data:;CHARSET=\"X\",X" assert_equals: expected "text/plain;charset=X" but got "text/plain;CHARSET=\"X\"" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any.worker-expected.txt >index 1c23aaadae8f3d5e97f221d22e75da13a2bfd58a..f624ea3820c27b5b5e0cf0ee356c52551255dd1c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any.worker-expected.txt >@@ -1,6 +1,6 @@ > > PASS Setup. >-FAIL "data://test/,X" assert_equals: expected "text/plain;charset=US-ASCII" but got "//test/" >+PASS "data://test/,X" > PASS "data://test:test/,X" > PASS "data:,X" > PASS "data:" >@@ -10,30 +10,30 @@ PASS "data:," > FAIL "data:,X#X" assert_array_equals: lengths differ, expected 1 got 3 > PASS "data:,%FF" > PASS "data:text/plain,X" >-FAIL "data:text/plain ,X" assert_equals: expected (string) "text/plain" but got (object) null >+PASS "data:text/plain ,X" > PASS "data:text/plain%20,X" > FAIL "data:text/plain\f,X" assert_equals: expected "text/plain%0c" but got "text/plain%0C" > FAIL "data:text/plain%0C,X" assert_equals: expected "text/plain%0c" but got "text/plain%0C" > FAIL "data:text/plain;,X" assert_equals: expected "text/plain" but got "text/plain;" >-FAIL "data:;x=x;charset=x,X" assert_equals: expected "text/plain;x=x;charset=x" but got ";x=x;charset=x" >-FAIL "data:;x=x,X" assert_equals: expected "text/plain;x=x" but got ";x=x" >+PASS "data:;x=x;charset=x,X" >+PASS "data:;x=x,X" > PASS "data:text/plain;charset=windows-1252,%C2%B1" > FAIL "data:text/plain;Charset=UTF-8,%C2%B1" assert_equals: expected "text/plain;charset=UTF-8" but got "text/plain;Charset=UTF-8" > PASS "data:image/gif,%C2%B1" > FAIL "data:IMAGE/gif,%C2%B1" assert_equals: expected "image/gif" but got "IMAGE/gif" > FAIL "data:IMAGE/gif;hi=x,%C2%B1" assert_equals: expected "image/gif;hi=x" but got "IMAGE/gif;hi=x" > FAIL "data:IMAGE/gif;CHARSET=x,%C2%B1" assert_equals: expected "image/gif;charset=x" but got "IMAGE/gif;CHARSET=x" >-FAIL "data: ,%FF" assert_equals: expected (string) "text/plain;charset=US-ASCII" but got (object) null >-FAIL "data:%20,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%20" >-FAIL "data:\f,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%0C" >-FAIL "data:%1F,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%1F" >-FAIL "data:\0,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%00" >-FAIL "data:%00,%FF" assert_equals: expected "text/plain;charset=US-ASCII" but got "%00" >-FAIL "data:text/html ,X" assert_equals: expected (string) "text/html" but got (object) null >-FAIL "data:text / html,X" assert_equals: expected "text/plain;charset=US-ASCII" but got "text / html" >-FAIL "data:â ,X" assert_equals: expected "text/plain;charset=US-ASCII" but got "%E2%80%A0" >+PASS "data: ,%FF" >+PASS "data:%20,%FF" >+PASS "data:\f,%FF" >+PASS "data:%1F,%FF" >+PASS "data:\0,%FF" >+PASS "data:%00,%FF" >+PASS "data:text/html ,X" >+PASS "data:text / html,X" >+PASS "data:â ,X" > FAIL "data:â /â ,X" assert_equals: expected "%e2%80%a0/%e2%80%a0" but got "%E2%80%A0/%E2%80%A0" >-FAIL "data:X,X" assert_equals: expected "text/plain;charset=US-ASCII" but got "X" >+PASS "data:X,X" > PASS "data:image/png,X X" > PASS "data:application/javascript,X X" > PASS "data:application/xml,X X" >@@ -42,32 +42,32 @@ PASS "data:text/plain,X X" > PASS "data:unknown/unknown,X X" > FAIL "data:text/plain;a=\",\",X" assert_equals: expected "text/plain;a=\"\"" but got "text/plain;a=\"" > PASS "data:text/plain;a=%2C,X" >-FAIL "data:;base64;base64,WA" assert_equals: expected "text/plain" but got ";base64" >+FAIL "data:;base64;base64,WA" assert_equals: expected "text/plain" but got "text/plain;base64" > FAIL "data:x/x;base64;base64,WA" assert_equals: expected "x/x" but got "x/x;base64" > FAIL "data:x/x;base64;charset=x,WA" assert_equals: expected "x/x;charset=x" but got "x/x;base64;charset=x" > FAIL "data:x/x;base64;charset=x;base64,WA" assert_equals: expected "x/x;charset=x" but got "x/x;base64;charset=x" > FAIL "data:x/x;base64;base64x,WA" assert_equals: expected "x/x" but got "x/x;base64;base64x" > PASS "data:;base64,W%20A" > PASS "data:;base64,W%0CA" >-FAIL "data:x;base64x,WA" assert_equals: expected "text/plain;charset=US-ASCII" but got "x;base64x" >-FAIL "data:x;base64;x,WA" assert_equals: expected "text/plain;charset=US-ASCII" but got "x;base64;x" >-FAIL "data:x;base64=x,WA" assert_equals: expected "text/plain;charset=US-ASCII" but got "x;base64=x" >+PASS "data:x;base64x,WA" >+PASS "data:x;base64;x,WA" >+PASS "data:x;base64=x,WA" > FAIL "data:; base64,WA" assert_array_equals: lengths differ, expected 1 got 2 > FAIL "data:; base64,WA" assert_array_equals: lengths differ, expected 1 got 2 > FAIL "data: ;charset=x ; base64,WA" assert_array_equals: lengths differ, expected 1 got 2 >-FAIL "data:;base64;,WA" assert_equals: expected "text/plain" but got ";base64;" >+FAIL "data:;base64;,WA" assert_equals: expected "text/plain" but got "text/plain;base64;" > FAIL "data:;base64 ,WA" assert_array_equals: lengths differ, expected 1 got 2 > FAIL "data:;base64 ,WA" assert_array_equals: lengths differ, expected 1 got 2 >-FAIL "data:;base 64,WA" assert_equals: expected "text/plain" but got ";base 64" >+FAIL "data:;base 64,WA" assert_equals: expected "text/plain" but got "text/plain;base 64" > PASS "data:;BASe64,WA" >-FAIL "data:;%62ase64,WA" assert_equals: expected "text/plain" but got ";%62ase64" >-FAIL "data:%3Bbase64,WA" assert_equals: expected "text/plain;charset=US-ASCII" but got "%3Bbase64" >-FAIL "data:;charset=x,X" assert_equals: expected "text/plain;charset=x" but got ";charset=x" >-FAIL "data:; charset=x,X" assert_equals: expected "text/plain;charset=x" but got "; charset=x" >-FAIL "data:;charset =x,X" assert_equals: expected "text/plain" but got ";charset =x" >-FAIL "data:;charset= x,X" assert_equals: expected "text/plain;charset=\" x\"" but got ";charset= x" >-FAIL "data:;charset=,X" assert_equals: expected "text/plain" but got ";charset=" >-FAIL "data:;charset,X" assert_equals: expected "text/plain" but got ";charset" >-FAIL "data:;charset=\"x\",X" assert_equals: expected "text/plain;charset=x" but got ";charset=\"x\"" >-FAIL "data:;CHARSET=\"X\",X" assert_equals: expected "text/plain;charset=X" but got ";CHARSET=\"X\"" >+FAIL "data:;%62ase64,WA" assert_equals: expected "text/plain" but got "text/plain;%62ase64" >+PASS "data:%3Bbase64,WA" >+PASS "data:;charset=x,X" >+FAIL "data:; charset=x,X" assert_equals: expected "text/plain;charset=x" but got "text/plain; charset=x" >+FAIL "data:;charset =x,X" assert_equals: expected "text/plain" but got "text/plain;charset =x" >+FAIL "data:;charset= x,X" assert_equals: expected "text/plain;charset=\" x\"" but got "text/plain;charset= x" >+FAIL "data:;charset=,X" assert_equals: expected "text/plain" but got "text/plain;charset=" >+FAIL "data:;charset,X" assert_equals: expected "text/plain" but got "text/plain;charset" >+FAIL "data:;charset=\"x\",X" assert_equals: expected "text/plain;charset=x" but got "text/plain;charset=\"x\"" >+FAIL "data:;CHARSET=\"X\",X" assert_equals: expected "text/plain;charset=X" but got "text/plain;CHARSET=\"X\"" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-blob-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-blob-expected.txt >index b84b5e871c6ed96575914d1df6b2344696c3f394..a7543a35d21441f5473617e2dfff82b4b59edc6e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-blob-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-blob-expected.txt >@@ -51,7 +51,7 @@ PASS 46) MIME types need to be parsed and serialized: > PASS 47) MIME types need to be parsed and serialized: / > PASS 48) MIME types need to be parsed and serialized: bogus > PASS 49) MIME types need to be parsed and serialized: bogus/ >-FAIL 50) MIME types need to be parsed and serialized: bogus/ assert_equals: expected "application/octet-stream" but got "bogus/" >+PASS 50) MIME types need to be parsed and serialized: bogus/ > PASS 51) MIME types need to be parsed and serialized: bogus/bogus/; > PASS 52) MIME types need to be parsed and serialized: </> > PASS 53) MIME types need to be parsed and serialized: (/)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 182325
:
356308
|
356310
|
356312
|
356314
|
356319
|
356335
|
356348
|
356359
|
356404
|
356504
|
356588
|
360026
|
360096
|
360101
|
360102
|
360104
|
360106
|
360239
|
360365
|
360367
|
360370
|
360499
|
361798
|
361806
|
361842