--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-highlight.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-highlight.js
@@ -9,17 +9,17 @@ async function ifTestingSupported() {
let { target, panel } = await initCanvasDebuggerFrontend(SIMPLE_CANVAS_URL);
let { window, $, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated]);
+ await Promise.all([recordingFinished, callListPopulated]);
is(CallsListView.itemCount, 8,
"All the function calls should now be displayed in the UI.");
is($(".call-item-view", CallsListView.getItemAtIndex(0).target).hasAttribute("draw-call"), true,
"The first item's node should have a draw-call attribute.");
is($(".call-item-view", CallsListView.getItemAtIndex(1).target).hasAttribute("draw-call"), false,
"The second item's node should not have a draw-call attribute.");
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-list.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-list.js
@@ -10,17 +10,17 @@ async function ifTestingSupported() {
let { target, panel } = await initCanvasDebuggerFrontend(SIMPLE_CANVAS_URL);
let { window, $, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated]);
+ await Promise.all([recordingFinished, callListPopulated]);
is(CallsListView.itemCount, 8,
"All the function calls should now be displayed in the UI.");
testItem(CallsListView.getItemAtIndex(0),
"1", "Object", "clearRect", "(0, 0, 128, 128)", "doc_simple-canvas.html:25");
testItem(CallsListView.getItemAtIndex(1),
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-search.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-search.js
@@ -10,17 +10,17 @@ async function ifTestingSupported() {
let { window, $, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
let searchbox = $("#calls-searchbox");
await reload(target);
let firstRecordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([firstRecordingFinished, callListPopulated]);
+ await Promise.all([firstRecordingFinished, callListPopulated]);
is(searchbox.value, "",
"The searchbox should be initially empty.");
is(CallsListView.visibleItems.length, 8,
"All the items should be initially visible in the calls list.");
searchbox.focus();
EventUtils.sendString("clear", window);
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-stack-01.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-stack-01.js
@@ -15,17 +15,17 @@ async function ifTestingSupported() {
let { target, panel } = await initCanvasDebuggerFrontend(SIMPLE_CANVAS_DEEP_STACK_URL);
let { window, $, $all, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated]);
+ await Promise.all([recordingFinished, callListPopulated]);
let callItem = CallsListView.getItemAtIndex(2);
let locationLink = $(".call-item-location", callItem.target);
is($(".call-item-stack", callItem.target), null,
"There should be no stack container available yet for the draw call.");
let callStackDisplayed = once(window, EVENTS.CALL_STACK_DISPLAYED);
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-stack-02.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-stack-02.js
@@ -16,17 +16,17 @@ async function ifTestingSupported() {
let { target, panel } = await initCanvasDebuggerFrontend(SIMPLE_CANVAS_DEEP_STACK_URL);
let { window, $, $all, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated]);
+ await Promise.all([recordingFinished, callListPopulated]);
let callItem = CallsListView.getItemAtIndex(2);
let locationLink = $(".call-item-location", callItem.target);
is($(".call-item-stack", callItem.target), null,
"There should be no stack container available yet for the draw call.");
let callStackDisplayed = once(window, EVENTS.CALL_STACK_DISPLAYED);
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-stack-03.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-call-stack-03.js
@@ -10,17 +10,17 @@ async function ifTestingSupported() {
let { target, panel } = await initCanvasDebuggerFrontend(SIMPLE_CANVAS_DEEP_STACK_URL);
let { window, $, $all, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated]);
+ await Promise.all([recordingFinished, callListPopulated]);
let callItem = CallsListView.getItemAtIndex(2);
let view = $(".call-item-view", callItem.target);
let contents = $(".call-item-contents", callItem.target);
is(view.hasAttribute("call-stack-populated"), false,
"The call item's view should not have the stack populated yet.");
is(view.hasAttribute("call-stack-expanded"), false,
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-img-screenshots.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-img-screenshots.js
@@ -10,17 +10,17 @@ async function ifTestingSupported() {
let { window, $, EVENTS, SnapshotsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
let screenshotDisplayed = once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated, screenshotDisplayed]);
+ await Promise.all([recordingFinished, callListPopulated, screenshotDisplayed]);
is($("#screenshot-container").hidden, false,
"The screenshot container should now be visible.");
is($("#screenshot-dimensions").getAttribute("value"), "128" + "\u00D7" + "128",
"The screenshot dimensions label has the expected value.");
is($("#screenshot-image").getAttribute("flipped"), "false",
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-img-thumbnails-01.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-img-thumbnails-01.js
@@ -10,17 +10,17 @@ async function ifTestingSupported() {
let { window, $, $all, EVENTS, SnapshotsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
let thumbnailsDisplayed = once(window, EVENTS.THUMBNAILS_DISPLAYED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated, thumbnailsDisplayed]);
+ await Promise.all([recordingFinished, callListPopulated, thumbnailsDisplayed]);
is($all(".filmstrip-thumbnail").length, 4,
"There should be 4 thumbnails displayed in the UI.");
let firstThumbnail = $(".filmstrip-thumbnail[index='0']");
ok(firstThumbnail,
"The first thumbnail element should be for the function call at index 0.");
is(firstThumbnail.width, 50,
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-img-thumbnails-02.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-img-thumbnails-02.js
@@ -12,17 +12,17 @@ async function ifTestingSupported() {
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
let thumbnailsDisplayed = once(window, EVENTS.THUMBNAILS_DISPLAYED);
let screenshotDisplayed = once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([
+ await Promise.all([
recordingFinished,
callListPopulated,
thumbnailsDisplayed,
screenshotDisplayed
]);
is($all(".filmstrip-thumbnail[highlighted]").length, 0,
"There should be no highlighted thumbnail available yet.");
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-02.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-02.js
@@ -23,17 +23,17 @@ async function ifTestingSupported() {
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
let thumbnailsDisplayed = once(window, EVENTS.THUMBNAILS_DISPLAYED);
let screenshotDisplayed = once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([
+ await Promise.all([
recordingFinished,
callListPopulated,
thumbnailsDisplayed,
screenshotDisplayed
]);
is(SnapshotsListView.itemCount, 1,
"There should be one snapshot displayed in the UI.");
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-slider-01.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-slider-01.js
@@ -9,17 +9,17 @@ async function ifTestingSupported() {
let { target, panel } = await initCanvasDebuggerFrontend(SIMPLE_CANVAS_URL);
let { window, $, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated]);
+ await Promise.all([recordingFinished, callListPopulated]);
is(CallsListView.selectedIndex, -1,
"No item in the function calls list should be initially selected.");
is($("#calls-slider").value, 0,
"The slider should be moved all the way to the start.");
is($("#calls-slider").min, 0,
"The slider minimum value should be 0.");
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-slider-02.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-slider-02.js
@@ -10,17 +10,17 @@ async function ifTestingSupported() {
let { window, $, EVENTS, gFront, SnapshotsListView, CallsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
let thumbnailsDisplayed = once(window, EVENTS.THUMBNAILS_DISPLAYED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated, thumbnailsDisplayed]);
+ await Promise.all([recordingFinished, callListPopulated, thumbnailsDisplayed]);
let firstSnapshot = SnapshotsListView.getItemAtIndex(0);
let firstSnapshotOverview = await firstSnapshot.attachment.actor.getOverview();
let thumbnails = firstSnapshotOverview.thumbnails;
is(thumbnails.length, 4,
"There should be 4 thumbnails cached for the snapshot item.");
@@ -74,19 +74,19 @@ async function ifTestingSupported() {
await once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
ok(true, "The full-sized screenshot was displayed for the item at index 0.");
await teardown(panel);
finish();
}
function waitForMozSetImageElement(panel) {
- let deferred = defer();
- panel._onMozSetImageElement = deferred.resolve;
- return deferred.promise;
+ return new Promise((resolve, reject) => {
+ panel._onMozSetImageElement = resolve;
+ });
}
function sameArray(a, b) {
if (a.length != b.length) {
return false;
}
for (let i = 0; i < a.length; i++) {
if (a[i] !== b[i]) {
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-stepping.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-stepping.js
@@ -9,17 +9,17 @@ async function ifTestingSupported() {
let { target, panel } = await initCanvasDebuggerFrontend(SIMPLE_CANVAS_URL);
let { window, $, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
await reload(target);
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, callListPopulated]);
+ await Promise.all([recordingFinished, callListPopulated]);
checkSteppingButtons(1, 1, 1, 1);
is(CallsListView.selectedIndex, -1,
"There should be no selected item in the calls list view initially.");
CallsListView._onResume();
checkSteppingButtons(1, 1, 1, 1);
is(CallsListView.selectedIndex, 0,
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-stop-01.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-stop-01.js
@@ -18,17 +18,17 @@ async function ifTestingSupported() {
is($("#empty-notice").hidden, true, "Empty notice not shown");
is($("#waiting-notice").hidden, false, "Waiting notice shown");
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let recordingCancelled = once(window, EVENTS.SNAPSHOT_RECORDING_CANCELLED);
SnapshotsListView._onRecordButtonClick();
- await promise.all([recordingFinished, recordingCancelled]);
+ await Promise.all([recordingFinished, recordingCancelled]);
ok(true, "Recording stopped and was considered failed.");
is(SnapshotsListView.itemCount, 0, "No snapshots in the list.");
is($("#empty-notice").hidden, false, "Empty notice shown");
is($("#waiting-notice").hidden, true, "Waiting notice not shown");
await teardown(panel);
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-stop-02.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-stop-02.js
@@ -17,17 +17,17 @@ async function ifTestingSupported() {
await recordingStarted;
is($("#empty-notice").hidden, true, "Empty notice not shown");
is($("#waiting-notice").hidden, false, "Waiting notice shown");
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let recordingCancelled = once(window, EVENTS.SNAPSHOT_RECORDING_CANCELLED);
- await promise.all([recordingFinished, recordingCancelled]);
+ await Promise.all([recordingFinished, recordingCancelled]);
ok(true, "Recording stopped and was considered failed.");
is(SnapshotsListView.itemCount, 0, "No snapshots in the list.");
is($("#empty-notice").hidden, false, "Empty notice shown");
is($("#waiting-notice").hidden, true, "Waiting notice not shown");
await teardown(panel);
--- a/devtools/client/canvasdebugger/test/browser_canvas-frontend-stop-03.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-stop-03.js
@@ -18,17 +18,17 @@ async function ifTestingSupported() {
await recordingStarted;
is($("#empty-notice").hidden, true, "Empty notice not shown");
is($("#waiting-notice").hidden, false, "Waiting notice shown");
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
let recordingCancelled = once(window, EVENTS.SNAPSHOT_RECORDING_CANCELLED);
- await promise.all([recordingFinished, recordingCancelled]);
+ await Promise.all([recordingFinished, recordingCancelled]);
ok(true, "Recording stopped and was considered failed.");
is(SnapshotsListView.itemCount, 0, "No snapshots in the list.");
is($("#empty-notice").hidden, false, "Empty notice shown");
is($("#waiting-notice").hidden, true, "Waiting notice not shown");
await teardown(panel);