2011-02-16 12:53:00 -08:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
|
|
|
|
function test() {
|
2011-03-28 11:20:26 -07:00
|
|
|
waitForExplicitFinish();
|
2011-02-16 12:53:00 -08:00
|
|
|
|
2011-03-28 11:20:26 -07:00
|
|
|
newWindowWithTabView(function (win) {
|
2011-02-16 12:53:00 -08:00
|
|
|
registerCleanupFunction(function () {
|
2011-03-28 11:20:26 -07:00
|
|
|
if (!win.closed)
|
|
|
|
win.close();
|
2011-02-16 12:53:00 -08:00
|
|
|
});
|
|
|
|
|
2011-03-28 11:20:26 -07:00
|
|
|
let tabItem = win.gBrowser.tabs[0]._tabViewTabItem;
|
|
|
|
tabItem.parent.remove(tabItem);
|
2011-02-16 12:53:00 -08:00
|
|
|
|
2011-03-28 11:20:26 -07:00
|
|
|
let cw = win.TabView.getContentWindow();
|
|
|
|
let container = cw.iQ(tabItem.container);
|
|
|
|
let expander = cw.iQ('.expander', container);
|
2011-02-16 12:53:00 -08:00
|
|
|
|
2011-03-28 11:20:26 -07:00
|
|
|
let bounds = container.bounds();
|
|
|
|
let halfWidth = bounds.width / 2;
|
|
|
|
let halfHeight = bounds.height / 2;
|
2011-02-16 12:53:00 -08:00
|
|
|
|
2011-03-28 11:20:26 -07:00
|
|
|
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");
|
2011-02-16 12:53:00 -08:00
|
|
|
|
2011-03-28 11:20:26 -07:00
|
|
|
win.close();
|
|
|
|
finish();
|
2011-02-16 12:53:00 -08:00
|
|
|
});
|
|
|
|
}
|