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"); |
|
abarth-chromium
2013/04/26 04:26:51
Thank you for adding tests. I was worried that yo
Takashi Toyoshima
2013/04/26 05:15:59
Thank you for advice.
I'm landing from independent
|
| + |
| +// 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. |
| + |
| +// 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> |