mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 07:37:57 +02:00
Adds text layer testing
This commit is contained in:
parent
40eb44eae4
commit
3fed93d808
3 changed files with 71 additions and 13 deletions
|
@ -514,7 +514,7 @@ def check(task, results, browser, masterMode):
|
|||
return
|
||||
|
||||
kind = task['type']
|
||||
if 'eq' == kind:
|
||||
if 'eq' == kind or 'text' == kind:
|
||||
checkEq(task, results, browser, masterMode)
|
||||
elif 'fbf' == kind:
|
||||
checkFBF(task, results, browser)
|
||||
|
@ -528,6 +528,7 @@ def checkEq(task, results, browser, masterMode):
|
|||
pfx = os.path.join(REFDIR, sys.platform, browser, task['id'])
|
||||
results = results[0]
|
||||
taskId = task['id']
|
||||
taskType = task['type']
|
||||
|
||||
passed = True
|
||||
for page in xrange(len(results)):
|
||||
|
@ -547,7 +548,7 @@ def checkEq(task, results, browser, masterMode):
|
|||
|
||||
eq = (ref == snapshot)
|
||||
if not eq:
|
||||
print 'TEST-UNEXPECTED-FAIL | eq', taskId, '| in', browser, '| rendering of page', page + 1, '!= reference rendering'
|
||||
print 'TEST-UNEXPECTED-FAIL | ', taskType, taskId, '| in', browser, '| rendering of page', page + 1, '!= reference rendering'
|
||||
|
||||
if not State.eqLog:
|
||||
State.eqLog = open(EQLOG_FILE, 'w')
|
||||
|
@ -576,7 +577,7 @@ def checkEq(task, results, browser, masterMode):
|
|||
of.close()
|
||||
|
||||
if passed:
|
||||
print 'TEST-PASS | eq test', task['id'], '| in', browser
|
||||
print 'TEST-PASS | ', taskType, ' test', task['id'], '| in', browser
|
||||
|
||||
def checkFBF(task, results, browser):
|
||||
round0, round1 = results[0], results[1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue