New file, does not affect build. This html test externalizes the bloat url -f cycle mechanism for browsers that don't have -f (TestGtkEmbed, etc.). (193748). r=jrgm, sr=bryner, a=dbaron

This commit is contained in:
mcafee%netscape.com 2003-02-18 00:07:47 +00:00
parent e7a54f070e
commit 8901c29ec3
2 changed files with 50 additions and 1 deletions

View File

@ -33,7 +33,16 @@ endif
include $(topsrcdir)/config/rules.mk
# Install bloaturls.txt file for tinderbox Bloaty test.
ifdef ENABLE_TESTS
# Install bloaturls.txt file for tinderbox bloat test.
libs:: bloaturls.txt
$(INSTALL) $< $(DIST)/bin
# Install bloatcycle.html into dist/bin/res, for auto-cycling
# of bloaturls.txt. This is for browsers that can't do -f
# autocycling of URLs.
libs:: bloatcycle.html
$(INSTALL) $< $(DIST)/bin/res
endif

40
build/bloatcycle.html Normal file
View File

@ -0,0 +1,40 @@
<script>
// bloat test driver for TestGtkEmbed
//
// set |user_pref("dom.allow_scripts_to_close_windows", true);| to
// allow this to close the window when the loop is done.
//
// "ftp://ftp.mozilla.org", // not supported for TestGtkEmbed
//
var list =
[
"http://www.mozilla.org",
"http://www.mozilla.org",
"resource:///res/samples/test2.html",
"resource:///res/samples/test8.html",
"resource:///res/samples/test6.html",
"resource:///res/samples/test8.html"
];
var interval = 3000; // 15000
var idx = 0;
var w;
window.onload = function () {
w = window.open("about:blank");
window.setTimeout(loadURL, interval);
};
function loadURL () {
w.location.href = list[idx++];
if (list[idx]) {
window.setTimeout(loadURL, interval);
} else {
window.setTimeout("w.close();", interval);
window.setTimeout("window.close();", interval);
}
}
var i;
for(i=0;i<6;i++) {
document.write(list[i]);
document.write("<br>");
}
</script>