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

Side by Side Diff: chrome/test/functional/ispy/server/debug_view_handler.py

Issue 106523003: [I-Spy] Add support for rebaselining expectations from the web UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing dom.py Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Request handler to display the debug view for a Failure.""" 5 """Request handler to display the debug view for a Failure."""
6 6
7 import jinja2 7 import jinja2
8 import os 8 import os
9 import sys 9 import sys
10 import webapp2 10 import webapp2
11 11
12 from ..common import ispy_utils 12 from common import ispy_utils
13 13
14 import views 14 import views
15 15
16 JINJA = jinja2.Environment( 16 JINJA = jinja2.Environment(
17 loader=jinja2.FileSystemLoader(os.path.dirname(views.__file__)), 17 loader=jinja2.FileSystemLoader(os.path.dirname(views.__file__)),
18 extensions=['jinja2.ext.autoescape']) 18 extensions=['jinja2.ext.autoescape'])
19 19
20 20
21 class DebugViewHandler(webapp2.RequestHandler): 21 class DebugViewHandler(webapp2.RequestHandler):
22 """Request handler to display the debug view for a failure.""" 22 """Request handler to display the debug view for a failure."""
(...skipping 13 matching lines...) Expand all
36 36
37 def _ImagePath(url): 37 def _ImagePath(url):
38 return '/image?file_path=%s' % url 38 return '/image?file_path=%s' % url
39 39
40 data['expected'] = _ImagePath(expected_path) 40 data['expected'] = _ImagePath(expected_path)
41 data['actual'] = _ImagePath(actual_path) 41 data['actual'] = _ImagePath(actual_path)
42 data['test_run'] = test_run 42 data['test_run'] = test_run
43 data['expectation'] = expectation 43 data['expectation'] = expectation
44 template = JINJA.get_template('debug_view.html') 44 template = JINJA.get_template('debug_view.html')
45 self.response.write(template.render(data)) 45 self.response.write(template.render(data))
OLDNEW
« no previous file with comments | « chrome/test/functional/ispy/server/app.py ('k') | chrome/test/functional/ispy/server/gs_bucket.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698