mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
21 lines
512 B
JavaScript
21 lines
512 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
"use strict";
|
|
|
|
add_task(async function test_unknown_event() {
|
|
let error;
|
|
try {
|
|
await SpecialMessageActions.handleAction(
|
|
{ type: "UNKNOWN_EVENT_123" },
|
|
gBrowser
|
|
);
|
|
} catch (e) {
|
|
error = e;
|
|
}
|
|
ok(error, "should throw if an unexpected event is handled");
|
|
Assert.equal(
|
|
error.message,
|
|
"Special message action with type UNKNOWN_EVENT_123 is unsupported."
|
|
);
|
|
});
|