From 010ff86106393a0912728104a965854006281491 Mon Sep 17 00:00:00 2001
From: Mark Holmquist
Date: Mon, 8 Apr 2013 10:34:08 -0700
Subject: [PATCH] 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
---
tests/parser/parserTests.txt | 193 +++++++++++++++++++++++++++++++++++
1 file changed, 193 insertions(+)
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
+