blob: 1ec14a421c20b05c7675ace561842c7ba6bd9e53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Check instanceof correctness. See Bug 599940.
const TEST_URI =
"data:text/html,<!DOCTYPE html>Test <code>instanceof</code> evaluation";
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);
let message = await executeAndWaitForResultMessage(
hud,
"[] instanceof Array",
"true"
);
ok(message, "`instanceof Array` is correct");
message = await executeAndWaitForResultMessage(
hud,
"({}) instanceof Object",
"true"
);
ok(message, "`instanceof Object` is correct");
message = await executeAndWaitForResultMessage(
hud,
"({}) instanceof Array",
"false"
);
ok(message, "`instanceof Array` has expected result");
});
|