mirror of
https://github.com/servo/servo.git
synced 2025-07-16 20:03:39 +01:00
Implement MediaError::Message
The spec says that it's ok to put an empty string in it if we don't have more informations.
This commit is contained in:
parent
b8c55e7da6
commit
eb0c1a53ad
4 changed files with 7 additions and 14 deletions
|
@ -5,6 +5,7 @@
|
||||||
use dom::bindings::codegen::Bindings::MediaErrorBinding::{self, MediaErrorMethods};
|
use dom::bindings::codegen::Bindings::MediaErrorBinding::{self, MediaErrorMethods};
|
||||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||||
use dom::bindings::root::DomRoot;
|
use dom::bindings::root::DomRoot;
|
||||||
|
use dom::bindings::str::DOMString;
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
|
|
||||||
|
@ -34,4 +35,9 @@ impl MediaErrorMethods for MediaError {
|
||||||
fn Code(&self) -> u16 {
|
fn Code(&self) -> u16 {
|
||||||
self.code
|
self.code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#dom-mediaerror-message
|
||||||
|
fn Message(&self) -> DOMString {
|
||||||
|
DOMString::new()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,4 +11,5 @@ interface MediaError {
|
||||||
const unsigned short MEDIA_ERR_DECODE = 3;
|
const unsigned short MEDIA_ERR_DECODE = 3;
|
||||||
const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
|
const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
|
||||||
readonly attribute unsigned short code;
|
readonly attribute unsigned short code;
|
||||||
|
readonly attribute DOMString message;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9993,12 +9993,6 @@
|
||||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onmousewheel" with the proper type (126)]
|
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onmousewheel" with the proper type (126)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[MediaError interface: attribute message]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[MediaError interface: errorVideo.error must inherit property "message" with the proper type (5)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[HTMLScriptElement interface: attribute noModule]
|
[HTMLScriptElement interface: attribute noModule]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
[error.html]
|
|
||||||
type: testharness
|
|
||||||
[audio.error after setting src to the empty string]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[video.error after setting src to the empty string]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue