From: Mark Holmquist
Date: Mon, 8 Apr 2013 17:34:08 +0000 (-0700)
Subject: Add parsoid-specific image testing
X-Git-Tag: 1.31.0-rc.0~19611^2
X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=010ff86106393a0912728104a965854006281491;p=lhc%2Fweb%2Fwiklou.git
Add parsoid-specific image testing
Using the wonderful
http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
to come up with some more sane image formats.
Change-Id: Ie98a2270ef7246d1e7b6e361d505c0bff7277c69
---
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 24dbc97045..422dea9b62 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -7878,6 +7878,198 @@ wgEnableUploads=0
!! end
+# Parsoid-specific testing for images
+# http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
+# Currently imperfect due to a flaw in the Parsoid testrunner
+# Work in progress
+
+!! test
+Parsoid-specific image handling - simple image
+!! options
+parsoid
+!! input
+[[Image:Foobar.jpg]]
+!! result
+
+!! end
+
+!! test
+Parsoid-specific image handling - simple image without link
+!! options
+parsoid
+!! input
+[[Image:Foobar.jpg|link=]]
+!! result
+
+
+
+
+
+
+
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with specific link
+!! options
+parsoid
+!! input
+[[Image:Foobar.jpg|link=Main Page]]
+!! result
+
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with size and middle alignment
+!! options
+parsoid
+!! input
+[[Image:Foobar.jpg|50px|middle]]
+!! result
+
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
+!! options
+parsoid
+!! input
+[[Image:Foobar.jpg|500x10px|baseline|caption]]
+!! result
+
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with border and size spec
+!! options
+parsoid
+!! input
+[[Image:Foobar.jpg|50px|border|caption]]
+!! result
+