From 4e38f4bc0d18089e706346359921c58e699e5c1b Mon Sep 17 00:00:00 2001 From: Rob Sayre Date: Sun, 26 Jun 2011 12:05:02 -0700 Subject: [PATCH 1/5] Move downloading code into separate function for readability. --- test/test.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/test/test.py b/test/test.py index b867251ee..c6723ada4 100644 --- a/test/test.py +++ b/test/test.py @@ -204,6 +204,23 @@ def makeBrowserCommands(browserManifestFile): browsers = [BrowserCommand(browser) for browser in json.load(bmf)] return browsers +def downloadLinkedPDFs(manifestList): + for item in manifestList: + f, isLink = item['file'], item.get('link', False) + if isLink and not os.access(f, os.R_OK): + linkFile = open(f +'.link') + link = linkFile.read() + linkFile.close() + + sys.stdout.write('Downloading '+ link +' to '+ f +' ...') + sys.stdout.flush() + response = urllib2.urlopen(link) + + with open(f, 'w') as out: + out.write(response.read()) + + print 'done' + def setUp(options): # Only serve files from a pdf.js clone assert not ANAL or os.path.isfile('../pdf.js') and os.path.isdir('../.git') @@ -227,22 +244,7 @@ def setUp(options): with open(options.manifestFile) as mf: manifestList = json.load(mf) - for item in manifestList: - f, isLink = item['file'], item.get('link', False) - if isLink and not os.access(f, os.R_OK): - linkFile = open(f +'.link') - link = linkFile.read() - linkFile.close() - - sys.stdout.write('Downloading '+ link +' to '+ f +' ...') - sys.stdout.flush() - response = urllib2.urlopen(link) - - out = open(f, 'w') - out.write(response.read()) - out.close() - - print 'done' + downloadLinkedPDFs(manifestList) for b in testBrowsers: State.taskResults[b.name] = { } From 5c5688d494e7ce6c2c0b5b6fb671c8c769f3483e Mon Sep 17 00:00:00 2001 From: Rob Sayre Date: Mon, 27 Jun 2011 12:35:48 -0700 Subject: [PATCH 2/5] Add reftest-analyzer.xhtml --- test/resources/reftest-analyzer.xhtml | 588 ++++++++++++++++++++++++++ 1 file changed, 588 insertions(+) create mode 100644 test/resources/reftest-analyzer.xhtml diff --git a/test/resources/reftest-analyzer.xhtml b/test/resources/reftest-analyzer.xhtml new file mode 100644 index 000000000..c59f5b899 --- /dev/null +++ b/test/resources/reftest-analyzer.xhtml @@ -0,0 +1,588 @@ + + + + + + + Reftest analyzer + + + + + + +
+ +

Reftest analyzer: load reftest log

+ +

Either paste your log into this textarea:
+