browser_jsonview_invalid_json.js (529B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 const TEST_JSON_URL = URL_ROOT + "invalid_json.json"; 7 8 add_task(async function () { 9 info("Test invalid JSON started"); 10 11 await addJsonViewTab(TEST_JSON_URL); 12 13 const count = await getElementCount(".textPanelBox"); 14 Assert.equal(count, 1, "The raw data panel must be shown"); 15 16 const text = await getElementText(".textPanelBox .jsonParseError"); 17 ok(text, "There must be an error description"); 18 });