mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Bug 670035 - remove test browser_tabview_bug625666.js; r=ehsan
This commit is contained in:
parent
ae3ca36769
commit
b028c2d4ff
@ -110,7 +110,6 @@ _BROWSER_FILES = \
|
|||||||
browser_tabview_bug625195.js \
|
browser_tabview_bug625195.js \
|
||||||
browser_tabview_bug625269.js \
|
browser_tabview_bug625269.js \
|
||||||
browser_tabview_bug625424.js \
|
browser_tabview_bug625424.js \
|
||||||
browser_tabview_bug625666.js \
|
|
||||||
browser_tabview_bug626368.js \
|
browser_tabview_bug626368.js \
|
||||||
browser_tabview_bug626525.js \
|
browser_tabview_bug626525.js \
|
||||||
browser_tabview_bug626791.js \
|
browser_tabview_bug626791.js \
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
/* Any copyright is dedicated to the Public Domain.
|
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
||||||
|
|
||||||
function test() {
|
|
||||||
let cw;
|
|
||||||
|
|
||||||
let getTabItemAspect = function (tabItem) {
|
|
||||||
let bounds = cw.iQ('.thumb', tabItem.container).bounds();
|
|
||||||
let padding = cw.TabItems.tabItemPadding;
|
|
||||||
return (bounds.height + padding.y) / (bounds.width + padding.x);
|
|
||||||
}
|
|
||||||
|
|
||||||
let getAspectRange = function () {
|
|
||||||
let aspect = cw.TabItems.tabAspect;
|
|
||||||
let variance = aspect / 100 * 1.5;
|
|
||||||
return new cw.Range(aspect - variance, aspect + variance);
|
|
||||||
}
|
|
||||||
|
|
||||||
waitForExplicitFinish();
|
|
||||||
|
|
||||||
newWindowWithTabView(function (win) {
|
|
||||||
registerCleanupFunction(function () win.close());
|
|
||||||
cw = win.TabView.getContentWindow();
|
|
||||||
|
|
||||||
// prepare orphan tab
|
|
||||||
let tabItem = win.gBrowser.tabs[0]._tabViewTabItem;
|
|
||||||
tabItem.parent.remove(tabItem, {immediately: true});
|
|
||||||
tabItem.setBounds(new cw.Rect(20, 20, 200, 165), true);
|
|
||||||
|
|
||||||
let bounds = tabItem.getBounds();
|
|
||||||
|
|
||||||
// prepare group item
|
|
||||||
let box = new cw.Rect(20, 300, 400, 200);
|
|
||||||
let groupItem = new cw.GroupItem([], {bounds: box, immediately: true});
|
|
||||||
|
|
||||||
groupItem.setBounds(new cw.Rect(20, 100, 400, 200));
|
|
||||||
groupItem.pushAway(true);
|
|
||||||
|
|
||||||
let newBounds = tabItem.getBounds();
|
|
||||||
ok(newBounds.width < bounds.width, "The new width of item is smaller than the old one.");
|
|
||||||
ok(newBounds.height < bounds.height, "The new height of item is smaller than the old one.");
|
|
||||||
|
|
||||||
let aspectRange = getAspectRange();
|
|
||||||
let aspect = getTabItemAspect(tabItem);
|
|
||||||
ok(aspectRange.contains(aspect), "orphaned tabItem's aspect is correct");
|
|
||||||
|
|
||||||
finish();
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user