Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Unified Diff: trunk/src/tools/bisect-builds.py

Issue 299273003: Revert 272587 "Remove kEnablePrintPreview now that the pdf plugi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/chrome/test/data/webui/print_preview.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/tools/bisect-builds.py
===================================================================
--- trunk/src/tools/bisect-builds.py (revision 272619)
+++ trunk/src/tools/bisect-builds.py (working copy)
@@ -62,7 +62,7 @@
"""A PathContext is used to carry the information used to construct URLs and
paths when dealing with the storage server and archives."""
def __init__(self, base_url, platform, good_revision, bad_revision,
- is_official, is_aura, flash_path = None):
+ is_official, is_aura, flash_path = None, pdf_path = None):
super(PathContext, self).__init__()
# Store off the input parameters.
self.base_url = base_url
@@ -72,6 +72,7 @@
self.is_official = is_official
self.is_aura = is_aura
self.flash_path = flash_path
+ self.pdf_path = pdf_path
# The name of the ZIP file in a revision directory on the server.
self.archive_name = None
@@ -362,7 +363,7 @@
# Run the build as many times as specified.
testargs = ['--user-data-dir=%s' % profile] + args
# The sandbox must be run as root on Official Chrome, so bypass it.
- if ((context.is_official or context.flash_path) and
+ if ((context.is_official or context.flash_path or context.pdf_path) and
context.platform.startswith('linux')):
testargs.append('--no-sandbox')
if context.flash_path:
@@ -372,6 +373,10 @@
# pass the correct version we just spoof it.
testargs.append('--ppapi-flash-version=99.9.999.999')
+ if context.pdf_path:
+ shutil.copy(context.pdf_path, os.path.dirname(context.GetLaunchPath()))
+ testargs.append('--enable-print-preview')
+
runcommand = []
for token in shlex.split(command):
if token == "%a":
@@ -464,6 +469,7 @@
try_args=(),
profile=None,
flash_path=None,
+ pdf_path=None,
interactive=True,
evaluate=AskIsGoodBuild):
"""Given known good and known bad revisions, run a binary search on all
@@ -500,7 +506,7 @@
profile = 'profile'
context = PathContext(base_url, platform, good_rev, bad_rev,
- official_builds, is_aura, flash_path)
+ official_builds, is_aura, flash_path, pdf_path)
cwd = os.getcwd()
print "Downloading list of known revisions..."
@@ -749,6 +755,12 @@
'binary to be used in this bisection (e.g. ' +
'on Windows C:\...\pepflashplayer.dll and on Linux ' +
'/opt/google/chrome/PepperFlash/libpepflashplayer.so).')
+ parser.add_option('-d', '--pdf_path', type = 'str',
+ help = 'Absolute path to a recent PDF pluggin ' +
+ 'binary to be used in this bisection (e.g. ' +
+ 'on Windows C:\...\pdf.dll and on Linux ' +
+ '/opt/google/chrome/libpdf.so). Option also enables ' +
+ 'print preview.')
parser.add_option('-g', '--good', type = 'str',
help = 'A good revision to start bisection. ' +
'May be earlier or later than the bad revision. ' +
@@ -819,6 +831,11 @@
msg = 'Could not find Flash binary at %s' % flash_path
assert os.path.exists(flash_path), msg
+ if opts.pdf_path:
+ pdf_path = opts.pdf_path
+ msg = 'Could not find PDF binary at %s' % pdf_path
+ assert os.path.exists(pdf_path), msg
+
if opts.official_builds:
good_rev = LooseVersion(good_rev)
bad_rev = LooseVersion(bad_rev)
@@ -835,7 +852,7 @@
(min_chromium_rev, max_chromium_rev) = Bisect(
base_url, opts.archive, opts.official_builds, opts.aura, good_rev,
bad_rev, opts.times, opts.command, args, opts.profile, opts.flash_path,
- not opts.not_interactive)
+ opts.pdf_path, not opts.not_interactive)
# Get corresponding blink revisions.
try:
« no previous file with comments | « trunk/src/chrome/test/data/webui/print_preview.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698