Bug 1645268 - update source.src|srcset, area.ping, a.ping, and RTCDataChannelsend to use USVString instead of DOMString to match the specs. Also fix a WPT bug so it lets us pass the RTC test; r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D208138
This commit is contained in:
Thomas Wisniewski 2024-04-22 16:48:29 +00:00
Родитель 1ca53421e5
Коммит c44d220824
6 изменённых файлов: 7 добавлений и 17 удалений

Просмотреть файл

@ -21,7 +21,7 @@ interface HTMLAnchorElement : HTMLElement {
[CEReactions, SetterThrows]
attribute DOMString download;
[CEReactions, SetterThrows]
attribute DOMString ping;
attribute USVString ping;
[CEReactions, SetterThrows]
attribute DOMString rel;
[CEReactions, SetterThrows]

Просмотреть файл

@ -28,7 +28,7 @@ interface HTMLAreaElement : HTMLElement {
[CEReactions, SetterThrows]
attribute DOMString download;
[CEReactions, SetterThrows]
attribute DOMString ping;
attribute USVString ping;
[CEReactions, SetterThrows]
attribute DOMString rel;
[CEReactions, SetterThrows]

Просмотреть файл

@ -16,14 +16,14 @@ interface HTMLSourceElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
attribute DOMString src;
attribute USVString src;
[CEReactions, SetterThrows]
attribute DOMString type;
};
partial interface HTMLSourceElement {
[CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
attribute DOMString srcset;
attribute USVString srcset;
[CEReactions, SetterThrows]
attribute DOMString sizes;
[CEReactions, SetterThrows]

Просмотреть файл

@ -36,7 +36,7 @@ interface RTCDataChannel : EventTarget
attribute EventHandler onbufferedamountlow;
attribute RTCDataChannelType binaryType;
[Throws]
undefined send(DOMString data);
undefined send(USVString data);
[Throws]
undefined send(Blob data);
[Throws]

Просмотреть файл

@ -1,17 +1,7 @@
[usvstring-reflection.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[source : unpaired surrogate codepoint should be replaced with U+FFFD]
expected: FAIL
[anchor : unpaired surrogate codepoint should be replaced with U+FFFD]
expected: FAIL
[area : unpaired surrogate codepoint should be replaced with U+FFFD]
expected: FAIL
# Bug 1631477
[UnregisterProtocolHandler URL: unpaired surrogate codepoint should not make any exceptions.]
expected: FAIL
[RTCDataChannel.send: unpaired surrogate codepoint should be replaced with U+FFFD.]
expected: FAIL

Просмотреть файл

@ -124,7 +124,7 @@ promise_test(t => {
const sendString = 'hello\uD999';
const receiveString = 'hello\uFFFD';
return createDataChannelPair(t)
return createDataChannelPair(t, {})
.then(([channel1, channel2]) => {
channel1.send(sendString);
return awaitMessage(channel2)