mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 00:17:47 -10:00
32 lines
853 B
JavaScript
32 lines
853 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 browser = toolWindow.document.querySelector(".browser");
|
|
let exitButton = toolWindow.document.getElementById("global-exit-button");
|
|
|
|
yield waitForFrameLoad(browser, 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");
|
|
});
|