summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorkbr <kbr@chromium.org>2015-01-21 20:20:27 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-22 04:21:09 +0000
commitfd59ae6c44ac0388a0d4929cd056231c78c7f0b4 (patch)
treec34a008ec732ecbc4440524a533bf95c5e0c6b79 /content
parente418076d38fade53c97df5f8175d32a1acae88ba (diff)
downloadchromium_src-fd59ae6c44ac0388a0d4929cd056231c78c7f0b4.zip
chromium_src-fd59ae6c44ac0388a0d4929cd056231c78c7f0b4.tar.gz
chromium_src-fd59ae6c44ac0388a0d4929cd056231c78c7f0b4.tar.bz2
Document and test that image_util.WritePngFile requires path end in 'png'.
Fix the GPU tests' cloud_storage_test_base to follow this requirement. BUG=450673 Review URL: https://codereview.chromium.org/865653004 Cr-Commit-Position: refs/heads/master@{#312561}
Diffstat (limited to 'content')
-rw-r--r--content/test/gpu/gpu_tests/cloud_storage_test_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/test/gpu/gpu_tests/cloud_storage_test_base.py b/content/test/gpu/gpu_tests/cloud_storage_test_base.py
index 2a7438c..f22ce3f 100644
--- a/content/test/gpu/gpu_tests/cloud_storage_test_base.py
+++ b/content/test/gpu/gpu_tests/cloud_storage_test_base.py
@@ -143,7 +143,7 @@ class ValidatorBase(page_test.PageTest):
# PNG to disk, following the pattern in bitmap_unittest.py. The key to
# avoiding PermissionErrors seems to be to not actually try to write to
# the temporary file object, but to re-open its name for all operations.
- temp_file = tempfile.NamedTemporaryFile().name
+ temp_file = tempfile.NamedTemporaryFile(suffix='.png').name
image_util.WritePngFile(bitmap, temp_file)
cloud_storage.Insert(bucket, name, temp_file, publicly_readable=public)
@@ -169,7 +169,7 @@ class ValidatorBase(page_test.PageTest):
# temporary file and gsutil's overwriting it.
if not self.options.refimg_cloud_storage_bucket:
raise Exception('--refimg-cloud-storage-bucket argument is required')
- temp_file = tempfile.NamedTemporaryFile().name
+ temp_file = tempfile.NamedTemporaryFile(suffix='.png').name
cloud_storage.Get(self.options.refimg_cloud_storage_bucket,
self._FormatReferenceImageName(img_name, page, tab),
temp_file)