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

Unified Diff: build/android/pylib/instrumentation/render_test.html.jinja

Issue 2875263002: 📷 Add toggling zoom and test title to RenderTest results. (Closed)
Patch Set: Created 3 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 | « no previous file | build/android/pylib/local/device/local_device_instrumentation_test_run.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/render_test.html.jinja
diff --git a/build/android/pylib/instrumentation/render_test.html.jinja b/build/android/pylib/instrumentation/render_test.html.jinja
index ab84eb4f4ddb52f2d086003cd159c03a93ad6990..147f31396d421cbd4f7058fcd55624fb4f8f9b9c 100644
--- a/build/android/pylib/instrumentation/render_test.html.jinja
+++ b/build/android/pylib/instrumentation/render_test.html.jinja
@@ -1,14 +1,31 @@
<html>
+<head>
+ <title>{{ test_name }}</title>
+ <script>
+ function toggleZoom() {
+ var imgs = document.getElementsByTagName("img");
+ for (i = 0; i < imgs.length; i++) {
Bernhard Bauer 2017/05/12 10:55:28 Can you use for-of iteration (https://developer.mo
PEConn 2017/05/12 13:47:23 Done.
+ if (imgs[i].hasAttribute('style')) {
+ imgs[i].removeAttribute('style');
+ } else {
+ imgs[i].style.width = '100%';
+ }
+ }
+ }
+ </script>
+</head>
+<body>
<table>
<tr>
<th>Failure</th>
<th>Golden</th>
<th>Diff</th>
</tr>
- <tr>
- <td><img src="{{ failure_link }}" width="100%"/></td>
- <td><img src="{{ golden_link }}" width="100%"/></td>
- <td><img src="{{ diff_link }}" width="100%"/></td>
+ <tr onclick="toggleZoom()">
+ <td><img src="{{ failure_link }}" style="width: 100%" /></td>
+ <td><img src="{{ golden_link }}" style="width: 100%" /></td>
+ <td><img src="{{ diff_link }}" style="width: 100%" /></td>
</tr>
</table>
+</body>
</html>
« no previous file with comments | « no previous file | build/android/pylib/local/device/local_device_instrumentation_test_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698