mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
ef1f986004
--HG-- extra : rebase_source : ddac3b95a6bc946e31edc88ba1d54df9a1c84e48
32 lines
900 B
JavaScript
32 lines
900 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
function test() {
|
|
waitForExplicitFinish();
|
|
|
|
newWindowWithTabView(function (win) {
|
|
registerCleanupFunction(function () {
|
|
if (!win.closed)
|
|
win.close();
|
|
});
|
|
|
|
let tabItem = win.gBrowser.tabs[0]._tabViewTabItem;
|
|
tabItem.parent.remove(tabItem);
|
|
|
|
let cw = win.TabView.getContentWindow();
|
|
let container = cw.iQ(tabItem.container);
|
|
let expander = cw.iQ('.expander', container);
|
|
|
|
let bounds = container.bounds();
|
|
let halfWidth = bounds.width / 2;
|
|
let halfHeight = bounds.height / 2;
|
|
|
|
let rect = new cw.Rect(bounds.left + halfWidth, bounds.top + halfHeight,
|
|
halfWidth, halfHeight);
|
|
ok(rect.contains(expander.bounds()), "expander is in the tabItem's bottom-right corner");
|
|
|
|
win.close();
|
|
finish();
|
|
});
|
|
}
|