mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
fb69aff5b1
--HG-- extra : rebase_source : 76cd5cf9d040b4afae392c336ccc292468b72b0e
28 lines
934 B
JavaScript
28 lines
934 B
JavaScript
// Very basic tests for the main window UI
|
|
|
|
const Cc = Components.classes;
|
|
const Ci = Components.interfaces;
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Entry point (must be named "test")
|
|
function test() {
|
|
is(window.location.href, "chrome://browser/content/browser.xul", "Main window should be browser.xul");
|
|
|
|
window.focus();
|
|
|
|
let browser = Browser.selectedBrowser;
|
|
isnot(browser, null, "Should have a browser");
|
|
|
|
is(browser.currentURI.spec, Browser.selectedTab.browser.currentURI.spec, "selectedBrowser == selectedTab.browser");
|
|
|
|
testContentContainerSize();
|
|
}
|
|
|
|
function testContentContainerSize() {
|
|
let container = document.getElementById("content-viewport");
|
|
|
|
let rect = container.getBoundingClientRect();
|
|
is(rect.width, window.innerWidth, "Content container is same width as window");
|
|
is(rect.height, window.innerHeight, "Content container is same height as window");
|
|
}
|