Permalink
Browse files

Bug 798163 - Fixed failing test testWaitForPageLoad in mutt/tests/js/…

…utils/pageload.js. r=hskupin
  • Loading branch information...
1 parent a2f7652 commit d7748a2f2bb6324657b905139a732dcbd719d9d3 @bobsilverberg bobsilverberg committed with whimboo Oct 15, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 mutt/mutt/tests/js/utils/pageload.js
@@ -86,15 +86,15 @@ var testWaitForPageLoad = function () {
* PART IV - Make sure we don't fail when clicking links on a page
*/
- controller.open("http://blog.mozilla.com");
+ controller.open(LOCATIONS[1].url);
controller.waitForPageLoad();
- var link = new elementslib.MozMillElement("Selector", "#nav-main-support>a",
+ var link = new elementslib.MozMillElement("Selector", "#link",
{document: controller.tabs.activeTab});
controller.click(link);
controller.waitForPageLoad();
- var target = new elementslib.MozMillElement("Selector", "#support-search",
+ var target = new elementslib.MozMillElement("Selector", "#test-div",
{document: controller.tabs.activeTab});
controller.waitForElement(target, 1000);
@@ -103,7 +103,7 @@ var testWaitForPageLoad = function () {
*/
// Load the container page
- var page = collector.addHttpResource('./files/') + "iframe.html";
+ var page = TEST_FOLDER + "iframe.html";
controller.open(page);
controller.waitForPageLoad();
@@ -118,8 +118,8 @@ var testWaitForPageLoad = function () {
controller.waitForPageLoad(frameController.window.document);
// Once the iframe has been loaded assert that the element exists
- var home = new elementslib.MozMillElement("ID", "home-fx", {document: frameWindow.document});
- expect.ok(home.exists(), "Node in iFrame has been found");
+ var elem = new elementslib.MozMillElement("ID", "test-div", {document: frameWindow.document});
+ expect.ok(elem.exists(), "Node in iFrame has been found");
/**
* PART VI - Loading a page in another tab should wait for its completion

0 comments on commit d7748a2

Please sign in to comment.