/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Test that ensures DOM nodes are rendered correctly in VariablesView.
"use strict";
function test() {
const TEST_URI = `
data:text/html;charset=utf-8,
Test for DOM nodes in variables view
`;
Task.spawn(runner).then(finishTest);
function* runner() {
const {tab} = yield loadTab(TEST_URI);
const hud = yield openConsole(tab);
const jsterm = hud.jsterm;
let deferred = promise.defer();
jsterm.once("variablesview-fetched", (_, val) => deferred.resolve(val));
jsterm.execute("inspect(document.querySelectorAll('div'))");
let variableScope = yield deferred.promise;
ok(variableScope, "Variables view opened");
yield findVariableViewProperties(variableScope, [
{ name: "0", value: ""},
{ name: "1", value: "
"},
{ name: "2", value: "
"},
{ name: "3", value: ""},
{ name: "4", value: ""},
{ name: "5", value: "
"},
{ name: "6", value: "
"},
{ name: "7", value: ""},
{ name: "8", value: ""},
], { webconsole: hud});
}
}