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

Unified Diff: sky/HACKING.md

Issue 836363003: Make a reftest for the flights app. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/compositor/display_delegate_bitmap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/HACKING.md
diff --git a/sky/HACKING.md b/sky/HACKING.md
index b2c18c2dbf55cd5ca360b30cb7a8803e4c960e9a..94977af6a4654c6578eaa10783d9728b719bb532 100644
--- a/sky/HACKING.md
+++ b/sky/HACKING.md
@@ -41,3 +41,27 @@ describe('My pretty test of my subject', function() {
});
});
```
+
+Adding pixel tests
+------------------
+
+Sky does not have proper pixel tests. Instead we have only reftests.
+If you want a pixel test, you need to dump the png from a reftest,
+upload it to googlestorage and then put and <img> pointing to the
+uploaded file in the reference.
+
+1. Create your test (e.g. foo.sky).
+2. Create an dummy reference file (foo-expected.sky).
+3. Run the test (it will fail).
+4. Copy the -actual.png file to googlestorage (see below).
+5. Put an <img> pointing to your newly uploaded png in the reference file.
+
+Copying the file to googlestorage:
+$ sha1sum ../out/Debug/layout-test-results/framework/flights-app-pixels-actual.png
+db0508cdfe69e996a93464050dc383f6480f1283 ../out/Debug/layout-test-results/framework/flights-app-pixels-actual.png
+$ gsutil.py cp ../out/Debug/layout-test-results/framework/flights-app-pixels-actual.png gs://mojo/sky-pngs/db0508cdfe69e996a93464050dc383f6480f1283
+
+Long-term, we should not have these tests at all and should just
+dump paint commands. In the short-term, if we find we're doing this
+a lot we should obviously automate this process, e.g. test_sky could
+do all of this work, including spitting out the correct reference file.
« no previous file with comments | « no previous file | sky/compositor/display_delegate_bitmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698