Automatically load eq.log into the reftest page.

This commit is contained in:
Rob Sayre 2011-06-27 13:22:37 -07:00
parent 4b96c06c27
commit e90ac1d4cd
2 changed files with 18 additions and 2 deletions

View File

@ -134,6 +134,8 @@ function load() {
if (params.log) {
ID("logentry").value = params.log;
log_pasted();
} else if (params.web) {
loadFromWeb(params.web);
}
}
@ -187,6 +189,17 @@ function show_phase(phaseid) {
ID("images").style.display = "none";
}
function loadFromWeb(url) {
var r = new XMLHttpRequest();
r.open("GET", url);
r.onreadystatechange = function() {
if (r.readyState == 4) {
process_log(r.response);
}
}
r.send(null);
}
function fileentry_changed() {
show_phase("loading");
var input = ID("fileentry");

View File

@ -56,7 +56,8 @@ MIMEs = {
'.json': 'application/json',
'.pdf': 'application/pdf',
'.xhtml': 'application/xhtml+xml',
'.ico': 'image/x-icon'
'.ico': 'image/x-icon',
'.log': 'text/plain'
}
class State:
@ -416,9 +417,11 @@ def processResults():
print 'done'
def startReftest(browser):
url = "http://127.0.0.1:8080/test/resources/reftest-analyzer.xhtml"
url += "#web=/test/eq.log"
try:
browser.setup()
browser.start("resources/reftest-analyzer.xhtml")
browser.start(url)
print "Waiting for browser..."
browser.process.wait()
finally: