Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
/* Any copyright is dedicated to the Public Domain.
"use strict";
add_task(async function () {
info("Test Object type property started");
const TEST_JSON_URL = 'data:application/json,{"x":{"type":"string"}}';
await addJsonViewTab(TEST_JSON_URL);
let count = await getElementCount(".jsonPanelBox .treeTable .treeRow");
is(count, 2, "There must be two rows");
// Collapse auto-expanded node.
await clickJsonNode(".jsonPanelBox .treeTable .treeLabel");
count = await getElementCount(".jsonPanelBox .treeTable .treeRow");
is(count, 1, "There must be one row");
const label = await getElementText(".jsonPanelBox .treeTable .objectCell");
is(label, `{${ELLIPSIS}}`, "The label must be indicating an object");
});