1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-27 13:28:54 +00:00
Files
UXP/devtools/client/jsonview/test/browser_jsonview_save_json.js
T
Moonchild 8c395520d9 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +08:00

38 lines
897 B
JavaScript

/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const TEST_JSON_URL = URL_ROOT + "valid_json.json";
let { MockFilePicker } = SpecialPowers;
MockFilePicker.init(window);
MockFilePicker.returnValue = MockFilePicker.returnCancel;
registerCleanupFunction(function () {
MockFilePicker.cleanup();
});
add_task(function* () {
info("Test save JSON started");
yield addJsonViewTab(TEST_JSON_URL);
let promise = new Promise((resolve) => {
MockFilePicker.showCallback = () => {
MockFilePicker.showCallback = null;
ok(true, "File picker was opened");
resolve();
};
});
let browser = gBrowser.selectedBrowser;
yield BrowserTestUtils.synthesizeMouseAtCenter(
".jsonPanelBox button.save",
{}, browser);
yield promise;
});