diff --git a/modules/libpr0n/test/reftest/encoders-lossless/encoder.html b/modules/libpr0n/test/reftest/encoders-lossless/encoder.html
new file mode 100644
index 00000000000..08b14898777
--- /dev/null
+++ b/modules/libpr0n/test/reftest/encoders-lossless/encoder.html
@@ -0,0 +1,112 @@
+
+
+Image reftest wrapper
+
+
+
+
+
+
+
+
+
diff --git a/modules/libpr0n/test/reftest/encoders-lossless/reftest.list b/modules/libpr0n/test/reftest/encoders-lossless/reftest.list
new file mode 100644
index 00000000000..0ecf89b8fe9
--- /dev/null
+++ b/modules/libpr0n/test/reftest/encoders-lossless/reftest.list
@@ -0,0 +1,155 @@
+# Encoder ref tests
+# These reftests must be run as HTTP because of canvas' origin-clean security
+# file:// URLs are always considered from a different origin unless same URL
+#
+# The test will copy a PNG image to a canvas, then use canvas.toDataUrl to get
+# the data, then set the data to a new image hence invoking the appropriate
+# encoder.
+#
+# The tests should only be used with lossless encoders.
+#
+# Valid arguments for encoder.html in the query string:
+# - img=
+# - mime=
+# - options=