Change various test runner scripts to run with Python 3.

Fix a small incompatibility in skia_gold.py along the way. Note that
this only affects running the Python scripts directly.

Bug: pdfium:1674
Change-Id: I8c8f7ec2360ad7a3e4a5784182a8d84d3265d37f
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/89053
Reviewed-by: Nigi <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/tools/run_corpus_tests.py b/testing/tools/run_corpus_tests.py
index edc4f02..02d829f 100755
--- a/testing/tools/run_corpus_tests.py
+++ b/testing/tools/run_corpus_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The PDFium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/testing/tools/run_javascript_tests.py b/testing/tools/run_javascript_tests.py
index cb6e69a..75fedb4 100755
--- a/testing/tools/run_javascript_tests.py
+++ b/testing/tools/run_javascript_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The PDFium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/testing/tools/run_pixel_tests.py b/testing/tools/run_pixel_tests.py
index 92523d1..8e7160d 100755
--- a/testing/tools/run_pixel_tests.py
+++ b/testing/tools/run_pixel_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The PDFium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/testing/tools/skia_gold/skia_gold.py b/testing/tools/skia_gold/skia_gold.py
index 136beb1..220f657 100644
--- a/testing/tools/skia_gold/skia_gold.py
+++ b/testing/tools/skia_gold/skia_gold.py
@@ -21,7 +21,7 @@
   kv_pairs = shlex.split(kv_str)
   if len(kv_pairs) % 2:
     raise ValueError('Uneven number of key/value pairs. Got %s' % kv_str)
-  return {kv_pairs[i]: kv_pairs[i + 1] for i in xrange(0, len(kv_pairs), 2)}
+  return {kv_pairs[i]: kv_pairs[i + 1] for i in range(0, len(kv_pairs), 2)}
 
 
 def add_skia_gold_args(parser):
diff --git a/testing/tools/test_runner.py b/testing/tools/test_runner.py
index f64d7a6..13faa6e 100644
--- a/testing/tools/test_runner.py
+++ b/testing/tools/test_runner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2016 The PDFium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.