mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Check for browsers in verifyOptions, so the script fails early.
This commit is contained in:
parent
14da398dee
commit
605535e94e
1 changed files with 5 additions and 4 deletions
|
@ -37,6 +37,8 @@ class TestOptions(OptionParser):
|
||||||
options.manifestFile = DEFAULT_MANIFEST_FILE
|
options.manifestFile = DEFAULT_MANIFEST_FILE
|
||||||
if options.browser and options.browserManifestFile:
|
if options.browser and options.browserManifestFile:
|
||||||
print "Warning: ignoring browser argument since manifest file was also supplied"
|
print "Warning: ignoring browser argument since manifest file was also supplied"
|
||||||
|
if not options.browser and not options.browserManifestFile:
|
||||||
|
self.error("No test browsers found. Use --browserManifest or --browser args.")
|
||||||
return options
|
return options
|
||||||
|
|
||||||
def prompt(question):
|
def prompt(question):
|
||||||
|
@ -219,10 +221,9 @@ def setUp(options):
|
||||||
if options.browserManifestFile:
|
if options.browserManifestFile:
|
||||||
testBrowsers = makeBrowserCommands(options.browserManifestFile)
|
testBrowsers = makeBrowserCommands(options.browserManifestFile)
|
||||||
elif options.browser:
|
elif options.browser:
|
||||||
testBrowsers = [BrowserCommand({"path":options.browser, "name":"firefox"})]
|
testBrowsers = [BrowserCommand({"path":options.browser, "name":"firefox"})]
|
||||||
else:
|
assert len(testBrowsers) > 0
|
||||||
print "No test browsers found. Use --browserManifest or --browser args."
|
|
||||||
|
|
||||||
with open(options.manifestFile) as mf:
|
with open(options.manifestFile) as mf:
|
||||||
manifestList = json.load(mf)
|
manifestList = json.load(mf)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue