Open Bug 376628 Opened 13 years ago Updated 11 years ago
reftest manifest listing reference as data URI should match
Start with 2 pages and a manifest: test.html: <!DOCTYPE html><html><head><title>test</title></head><body>AAA</body></html> ref.html: <!DOCTYPE html><html><head><title>test</title></head><body>AAA</body></html> reftest.list: == test.html ref.html Run reftest on this and the test will fail and one will get a URI of the images. Copy and paste the data URI of the test image into the manifest as a reference. It will look similar to this: reftest.list: == test.html data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyA... This should pass. The image was generated from the test, so it should be correct. The reference image is actually displayed slightly smaller than the test, though, and so the test fails. I have proposed that checks be doable against actual png files and have made this work. dbaron expressed the preference that PNG data not be consumed from image files, but from data URIs. However, using the data URI does not work. Perhaps it should be made to work. It would probably be easier to manage a manifest with data URIs than a bunch of images. It certainly would be easier to manage the manifests in CVS, rather than adding files.
(In reply to comment #0) > == test.html data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyA... > > This should pass. The image was generated from the test, so it should be > correct. No. If you view an image, you get content area padding and margins that'll cause the image to not line up correctly with the HTML from which it was generated. You don't have any choice about this, and as an image there's nothing you can do about it, although you could hack reftest (a very ugly hack) to remove said padding and other things from the image before doing the comparison.
data:text/html,<body><img src="data:image/png;base64,... plus some attributes on <body> to suppress margins?
Component: Testing → Reftest
Product: Core → Testing
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.