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

Unified Diff: trunk/src/chrome/test/functional/ispy/server/main_view_handler.py

Issue 104793008: Revert 240226 "[I-Spy] Add support for rebaselining expectations..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
Index: trunk/src/chrome/test/functional/ispy/server/main_view_handler.py
===================================================================
--- trunk/src/chrome/test/functional/ispy/server/main_view_handler.py (revision 241749)
+++ trunk/src/chrome/test/functional/ispy/server/main_view_handler.py (working copy)
@@ -11,9 +11,8 @@
import sys
import webapp2
-from common import chrome_utils
-from common import constants
-from common import ispy_utils
+from ..common import constants
+from ..common import ispy_utils
import gs_bucket
import views
@@ -68,20 +67,20 @@
"""
paths = set([path for path in ispy.GetAllPaths('failures/' + test_run)
if path.endswith('actual.png')])
- can_rebaseline = chrome_utils.ChromeUtils(
- ispy.cloud_bucket).CanRebaselineToTestRun(test_run)
rows = [self._CreateRow(test_run, path, ispy) for path in paths]
+ if rows:
+ # Function that sorts by the different_pixels field in the failure-info.
+ def _Sorter(a, b):
+ return cmp(b['percent_different'],
+ a['percent_different'])
+ template = JINJA.get_template('main_view.html')
+ self.response.write(
+ template.render({'comparisons': sorted(rows, _Sorter),
+ 'test_run': test_run}))
+ else:
+ template = JINJA.get_template('empty_view.html')
+ self.response.write(template.render())
- # Function that sorts by the different_pixels field in the failure-info.
- def _Sorter(a, b):
- return cmp(b['percent_different'],
- a['percent_different'])
- template = JINJA.get_template('main_view.html')
- self.response.write(
- template.render({'comparisons': sorted(rows, _Sorter),
- 'test_run': test_run,
- 'can_rebaseline': can_rebaseline}))
-
def _CreateRow(self, test_run, path, ispy):
"""Creates one failure-row.

Powered by Google App Engine
This is Rietveld 408576698