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

Unified Diff: tools/android/loading/run_sandwich.py

Issue 1698883002: sandwich: Adds command line flag to disable WPR injections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d04
Patch Set: Address matt's nits Created 4 years, 10 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 | « tools/android/loading/device_setup.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/run_sandwich.py
diff --git a/tools/android/loading/run_sandwich.py b/tools/android/loading/run_sandwich.py
index 9274819a2c4823824ee590f27828e15d4f6ffc97..f72ba8205c5acd2b8758b477ce3fe62d30153ce3 100755
--- a/tools/android/loading/run_sandwich.py
+++ b/tools/android/loading/run_sandwich.py
@@ -296,6 +296,11 @@ def main():
help='Web page replay archive to load job\'s urls from.')
parser.add_argument('--wpr-record', default=False, action='store_true',
help='Record web page replay archive.')
+ parser.add_argument('--disable-wpr-script-injection', default=False,
+ action='store_true',
+ help='Disable WPR default script injection such as ' +
+ 'overriding javascript\'s Math.random() and Date() ' +
+ 'with deterministic implementations.')
args = parser.parse_args()
if not os.path.isdir(args.output):
@@ -317,9 +322,8 @@ def main():
local_cache_directory_path = tempfile.mkdtemp(suffix='.cache')
_UnzipDirectoryContent(local_cache_archive_path, local_cache_directory_path)
- with device_setup.WprHost(device,
- args.wpr_archive,
- args.wpr_record) as additional_flags:
+ with device_setup.WprHost(device, args.wpr_archive, args.wpr_record,
+ args.disable_wpr_script_injection) as additional_flags:
pages_loaded = 0
for _ in xrange(args.repeat):
for url in job_urls:
« no previous file with comments | « tools/android/loading/device_setup.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698