Files
firefox/devtools/client/responsive.html/test/browser/browser_exit_button.js
T
Dave Townsend 4ac1a46d5e Bug 1257246: Update devtools for eslint 2. r=pbro
ESLint 2 now flags anonymous generator functions according to
generator-star-spacing. Most of the changes here are correcting that.

MozReview-Commit-ID: 9xg2Gmlaz94
2016-04-05 11:31:19 -07:00

31 lines
786 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test global exit button
const TEST_URL = "data:text/html;charset=utf-8,";
addRDMTask(TEST_URL, function* ({ ui, manager }) {
let { toolWindow } = ui;
let { store } = toolWindow;
// Wait until the viewport has been added
yield waitUntilState(store, state => state.viewports.length == 1);
let exitButton = toolWindow.document.getElementById("global-exit-button");
yield waitForFrameLoad(ui, TEST_URL);
ok(manager.isActiveForTab(ui.tab),
"Responsive Design Mode active for the tab");
exitButton.click();
yield once(manager, "off");
ok(!manager.isActiveForTab(ui.tab),
"Responsive Design Mode is not active for the tab");
});