Chromium Code Reviews| Index: LayoutTests/fast/events/constructors/midi-connection-event-constructor.html |
| diff --git a/LayoutTests/fast/events/constructors/midi-connection-event-constructor.html b/LayoutTests/fast/events/constructors/midi-connection-event-constructor.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4b8a8157814a8f54e69683a2a3e771a94b9738ad |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/constructors/midi-connection-event-constructor.html |
| @@ -0,0 +1,33 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="../../js/resources/js-test-pre.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| + |
| +description("This tests the constructor for the MIDIConnectionEvent DOM class."); |
| + |
| +// No initializer is passed. |
| +shouldBe("new MIDIConnectionEvent('eventType').bubbles", "false"); |
| +shouldBe("new MIDIConnectionEvent('eventType').cancelable", "false"); |
| +shouldBe("new MIDIConnectionEvent('eventType').port", "null"); |
| + |
| +// bubbles is passed. |
| +shouldBe("new MIDIConnectionEvent('eventType', { bubbles: false }).bubbles", "false"); |
| +shouldBe("new MIDIConnectionEvent('eventType', { bubbles: true }).bubbles", "true"); |
| + |
| +// cancelable is passed. |
| +shouldBe("new MIDIConnectionEvent('eventType', { cancelable: false }).cancelable", "false"); |
| +shouldBe("new MIDIConnectionEvent('eventType', { cancelable: true }).cancelable", "true"); |
| + |
| +// FIXME: Add a test case to pass port once MIDIPort is available. |
|
haraken
2013/04/25 06:33:00
Why can't you add the test in this patch?
Takashi Toyoshima
2013/04/25 07:20:27
Currently MIDIPort is implemented, but no way is e
haraken
2013/04/25 07:36:47
Why isn't it exposed? You've written Dictionary::g
Takashi Toyoshima
2013/04/25 07:47:51
As line 14 is, it's always null for now :(
MIDIPor
|
| + |
| +// All initializers are passed. |
| +shouldBe("new MIDIConnectionEvent('eventType', { bubbles: true, cancelable: true }).bubbles", "true"); |
| +shouldBe("new MIDIConnectionEvent('eventType', { bubbles: true, cancelable: true }).cancelable", "true"); |
| + |
| +</script> |
| +<script src="../../js/resources/js-test-post.js"></script> |
| +</body> |
| +</html> |