add Intel ISA doc as load test, and make harness resilient to bad PDF loads

This commit is contained in:
Chris Jones 2011-06-24 19:23:29 -07:00
parent 74fad436e4
commit 6ca1c4cf83
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1 @@
http://www.intel.com/Assets/PDF/manual/253665.pdf

View File

@ -14,6 +14,12 @@
"rounds": 1,
"type": "load"
},
{ "id": "intelisa-load",
"file": "pdfs/intelisa.pdf",
"link": true,
"rounds": 1,
"type": "load"
},
{ "id": "pdfspec-load",
"file": "pdfs/pdf.pdf",
"link": true,

View File

@ -63,7 +63,14 @@ function nextTask() {
if (r.readyState == 4) {
var data = r.mozResponseArrayBuffer || r.mozResponse ||
r.responseArrayBuffer || r.response;
pdfDoc = new PDFDoc(new Stream(data));
try {
pdfDoc = new PDFDoc(new Stream(data));
} catch(e) {
pdfDoc.numPages = 1;
failure = 'load PDF doc: '+ e.toString();
}
currentTask.pageNum = 1, nextPage();
}
};