Implement document.createEvent(TouchEvent)

This commit is contained in:
Axel Solis Trompler 2015-10-23 15:30:26 +02:00
parent 28f4dd4f48
commit 2cb6972d14
3 changed files with 2 additions and 25 deletions

View file

@ -1395,6 +1395,8 @@ impl DocumentMethods for Document {
Ok(Root::upcast(KeyboardEvent::new_uninitialized(&self.window))),
"messageevent" =>
Ok(Root::upcast(MessageEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
"touchevent" =>
Ok(Root::upcast(TouchEvent::new_uninitialized(&self.window, &TouchList::new(&self.window, &[]), &TouchList::new(&self.window, &[]), &TouchList::new(&self.window, &[])))),
_ =>
Err(Error::NotSupported),
}

View file

@ -1,5 +0,0 @@
[EventTarget-dispatchEvent.html]
type: testharness
[If the event's initialized flag is not set, an InvalidStateError must be thrown (TouchEvent).]
expected: FAIL

View file

@ -1,20 +0,0 @@
[Document-createEvent.html]
type: testharness
[TouchEvent should be an alias for TouchEvent.]
expected: FAIL
[createEvent('TouchEvent') should be initialized correctly.]
expected: FAIL
[touchevent should be an alias for TouchEvent.]
expected: FAIL
[createEvent('touchevent') should be initialized correctly.]
expected: FAIL
[TOUCHEVENT should be an alias for TouchEvent.]
expected: FAIL
[createEvent('TOUCHEVENT') should be initialized correctly.]
expected: FAIL