Fixed a test after the delay loading frame changes

This commit is contained in:
Raymond Lee 2010-08-10 10:31:59 +08:00
parent 7256f9fc2d
commit 3f4c868644

View File

@ -39,7 +39,13 @@ function test() {
waitForExplicitFinish();
TabView.toggle();
ok(TabView.isVisible(), "Tab View is visible");
window.addEventListener("tabviewshown", onTabViewWindowLoaded, false);
}
function onTabViewWindowLoaded() {
window.removeEventListener("tabviewshown", onTabViewWindowLoaded, false);
ok(TabView.isVisible(), "Tab View is visible");
let contentWindow = document.getElementById("tab-view").contentWindow;
@ -47,7 +53,7 @@ function test() {
let padding = 10;
let pageBounds = contentWindow.Items.getPageBounds();
pageBounds.inset(padding, padding);
let box = new contentWindow.Rect(pageBounds);
box.width = 300;
box.height = 300;
@ -81,7 +87,6 @@ function test() {
groupOne.newTab("");
}
function addTest(contentWindow, groupOneId, groupTwoId) {
let groupOne = contentWindow.GroupItems.groupItem(groupOneId);
let groupTwo = contentWindow.GroupItems.groupItem(groupTwoId);