Revision 8c503e75150f239ea2884392d26740a284859d1c authored by Bobby Holley on 09 April 2018, 05:22:47 UTC, committed by moz-wptsync-bot on 09 April 2018, 05:38:06 UTC
dbaron asked for this in bug 507762, but it never happened.
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1451421
gecko-commit: 2189673fb8ea87ac07cd3cffe5a86cbdf497865d
gecko-integration-branch: central
gecko-reviewers: xidorn
1 parent 99e1ae2
Raw File
MessageEvent.html
<!doctype html>
<meta charset=utf-8>
<title>MessageEvent</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
var prefixes = ['moz', 'ms', 'o', 'webkit'];
prefixes.forEach(function(prefix) {
  var name = prefix + "InitMessageEvent";

  test(function() {
    assert_false(name in MessageEvent.prototype);
  }, name + " on the prototype");

  test(function() {
    var event = new MessageEvent("message");
    assert_false(name in event);
  }, name + " on the instance");
});

test(function() {
  var event = new MessageEvent("message");
  assert_throws(new TypeError(), function() {
    event.initMessageEvent();
  }, "Not enough arguments to initMessageEvent");
}, "initMessageEvent with no arguments");
</script>
back to top