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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 1999243002: Import wpt@5df9b57edb3307a87d5187804b29c8ddd2aa14e1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add expectations files (using run-webkit-tests --new-baseline) Created 4 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 | « third_party/WebKit/LayoutTests/platform/linux/imported/wpt/FileAPI/blob/Blob-constructor-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index 0ec88c7c76f3be5dc07f61a90d041127ba8a36b4..da460fd18fb179d8b3d20be06db05661bed8d838 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -191,6 +191,7 @@ class RebaselineTest(BaseInternalRebaselineCommand):
return self._tool.buildbot.builder_with_name(builder_name).latest_layout_test_results_url()
def _save_baseline(self, data, target_baseline, baseline_directory, test_name, suffix):
+ _log.debug('Calling _save_baseline(%r, %r, %r, %r, %r)', data, target_baseline, baseline_directory, test_name, suffix)
if not data:
_log.debug("No baseline data to save.")
return
@@ -208,8 +209,11 @@ class RebaselineTest(BaseInternalRebaselineCommand):
target_baseline = self._tool.filesystem.join(baseline_directory, self._file_name_for_expected_result(test_name, suffix))
_log.debug("Retrieving %s." % source_baseline)
- self._save_baseline(self._tool.web.get_binary(source_baseline, convert_404_to_None=True),
- target_baseline, baseline_directory, test_name, suffix)
+ try:
+ data = self._tool.web.get_binary(source_baseline, convert_404_to_None=True)
+ except urllib2.URLError:
+ data = None
+ self._save_baseline(data, target_baseline, baseline_directory, test_name, suffix)
def _rebaseline_test_and_update_expectations(self, options):
self._baseline_suffix_list = options.suffixes.split(',')
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/linux/imported/wpt/FileAPI/blob/Blob-constructor-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698