From: jenkins-bot
Date: Wed, 25 Jan 2017 19:08:23 +0000 (+0000)
Subject: Merge "Update html/php clauses for subpage parserTests."
X-Git-Tag: 1.31.0-rc.0~4230
X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=90f0807c54370c05042632f77d2ffb846e8be628;hp=-c;p=lhc%2Fweb%2Fwiklou.git
Merge "Update html/php clauses for subpage parserTests."
---
90f0807c54370c05042632f77d2ffb846e8be628
diff --combined tests/parser/parserTests.txt
index cc202ac54f,6e93319615..1563525f94
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@@ -933,7 -933,6 +933,7 @@@ Italics and bold: 5-quote opening seque
###
### multiple quote sequences in a line
###
+
!! test
Italics and bold: multiple quote sequences: (2,4,2)
!! options
@@@ -943,7 -942,8 +943,7 @@@ parsoid=wt2htm
!! html/*
foo'bar
-!!end
-
+!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
@@@ -955,6 -955,7 +955,6 @@@ Italics and bold: multiple quote sequen
!! end
-
!! test
Italics and bold: multiple quote sequences: (2,4,3)
!! options
@@@ -964,7 -965,8 +964,7 @@@ parsoid=wt2htm
!! html/*
foo'bar
-!!end
-
+!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
@@@ -976,6 -978,7 +976,6 @@@ Italics and bold: multiple quote sequen
!! end
-
!! test
Italics and bold: multiple quote sequences: (2,4,4)
!! options
@@@ -985,7 -988,8 +985,7 @@@ parsoid=wt2htm
!! html/*
foo'bar'
-!!end
-
+!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
@@@ -997,6 -1001,7 +997,6 @@@ Italics and bold: multiple quote sequen
!! end
-
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: multiple quote sequences: (3,4,2)
@@@ -1010,21 -1015,24 +1010,21 @@@ parsoid=wt2htm
!! html/parsoid
foo'bar
-!!end
+!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
-!! options
-parsoid
!! wikitext
-'''foo''''bar''''
+'''foo''''bar''''
!! html/php
foo'bar
!! html/parsoid
-
foo'bar
+
foo'bar
!! end
-
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: multiple quote sequences: (3,4,3)
@@@ -1038,18 -1046,18 +1038,18 @@@ parsoid=wt2htm
!! html/parsoid
foo'bar
-!!end
+!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
!! wikitext
-'''foo''''bar''''''
+'''foo''''bar''''''
!! html/php
foo'bar
!! html/parsoid
-
foo'bar
+
foo'bar
!! end
@@@ -1127,7 -1135,7 +1127,7 @@@ The ''[[Main Page]]'''s talk page
+!! end
+
!! test
Link containing double-single-quotes '' in text (bug 4598 sanity check)
!! wikitext
@@@ -7863,7 -7849,7 +7863,7 @@@ Some [[Link|pretty ''italics'' and stuf
!! end
!! test
@@@ -8148,19 -8134,32 +8148,32 @@@ Link with multiple ":" in a subpage-sup
Handle title parsing for subpages
!! options
title=[[/123123]]
+ subpage
!! wikitext
123
+ !! html/php
+
123
+
!! html/parsoid
123
!! end
- ## FIXME: Add a working php section here
+ !! article
+ User:Test/123
+ !! text
+ test 123
+ !! endarticle
+
!! test
Link to a subpage from a namespace other than main
!! options
- title=[[User:test]]
+ title=[[User:Test]]
+ subpage
!! wikitext
[[/123]]
+ !! html/php
+
!! wikitext
Aðrir mótmælenda[[söfnuður]]
!! end
@@@ -8303,10 -8305,12 +8317,10 @@@ Parsoid-centric test: Whitespace in ext
!! test
Parsoid: Scoped parsing should handle mixed transclusions and plain text
-!! options
-parsoid
!! wikitext
[[Foo|{{echo|a}} b {{echo|c}}]]
-!! html
-
!! end
!! test
@@@ -15056,12 -15060,12 +15070,12 @@@ Ba
Bar
!! html/parsoid
-
Foo Bar
-
Foo Bar
-
Foo Bar
-
Foo Bar
-
Foo Bar
-
+
Foo Bar
+
Foo Bar
+
Foo Bar
+
Foo Bar
+
Foo Bar
+
!! end
## We used to, but no longer wt2wt this test since the default serializer
@@@ -16093,7 -16097,7 +16107,7 @@@ div with braces in attribute valu
!! wikitext
Foo
!! html/php
-
Foo
+
Foo
!! html/parsoid
Foo
@@@ -16533,11 -16537,9 +16547,11 @@@ Template:Div styl
Bug 2304: HTML attribute safety (safe template; regression bug 2309)
!! wikitext
-!! html
+!! html/php
+!! html/parsoid
+
!! end
# Parsoid has enough context to handle this case
@@@ -16556,36 -16558,29 +16570,36 @@@ Bug 2304: HTML attribute safety (danger
Bug 2304: HTML attribute safety (dangerous style template; 2309)
!! wikitext
-!! html
+!! html/php
+!! html/parsoid
+
!! end
!! test
Bug 2304: HTML attribute safety (safe parameter; 2309)
!! wikitext
{{div style|width: 200px}}
-!! html
+!! html/php
Magic div
+!! html/parsoid
+
Magic div
!! end
!! test
Bug 2304: HTML attribute safety (unsafe parameter; 2309)
!! wikitext
{{div style|width: expression(alert(document.cookie))}}
-!! html
+!! html/php
Magic div
+!! html/parsoid
+
Magic div
!! end
+## Parsoid output here differs; needs investigation.
!! test
Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
!! wikitext
@@@ -16595,7 -16590,6 +16609,7 @@@
!! end
+## Parsoid output here differs; needs investigation.
!! test
Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
!! wikitext
@@@ -16632,6 -16626,7 +16646,6 @@@ Bug 2304: HTML attribute safety (bold
!! end
-
!! test
Bug 2304: HTML attribute safety (ISBN)
!! wikitext
@@@ -16681,22 -16676,18 +16695,22 @@@ Bug 2304: HTML attribute safety (named
Bug 3244: HTML attribute safety (extension; safe)
!! wikitext
-!! html
+!! html/php
+!! html/parsoid
+
!! end
!! test
Bug 3244: HTML attribute safety (extension; unsafe)
!! wikitext
-!! html
+!! html/php
+!! html/parsoid
+
!! end
# More MSIE fun discovered by Tom Gilder
@@@ -16705,55 -16696,45 +16719,55 @@@
MSIE CSS safety test: spurious slash
!! wikitext
evil
-!! html
+!! html/php
evil
+!! html/parsoid
+
evil
!! end
!! test
MSIE CSS safety test: hex code
!! wikitext
evil
-!! html
+!! html/php
evil
+!! html/parsoid
+
evil
!! end
!! test
MSIE CSS safety test: comment in url
!! wikitext
evil
-!! html
+!! html/php
evil
+!! html/parsoid
+
evil
!! end
!! test
MSIE CSS safety test: comment in expression
!! wikitext
evil4
-!! html
+!! html/php
evil4
+!! html/parsoid
+
evil4
!! end
!! test
CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
!! wikitext
A
-!! html
+!! html/php
A
+!! html/parsoid
+
A
!! end
!! test
@@@ -16761,13 -16742,10 +16775,13 @@@ MSIE 6 CSS safety test: Fullwidth (bug
!! wikitext
A
B
-!! html
+!! html/php
A
B
+!! html/parsoid
+
A
+
B
!! end
!! test
@@@ -16775,13 -16753,10 +16789,13 @@@ MSIE 6 CSS safety test: IPA extensions
!! wikitext
A
B
-!! html
+!! html/php
A
B
+!! html/parsoid
+
A
+
B
!! end
!! test
@@@ -16790,30 -16765,23 +16804,30 @@@ MSIE 6 CSS safety test: sup/sub script
A
B
C
-!! html
+!! html/php
A
B
C
+!! html/parsoid
+
A
+
B
+
C
!! end
-# FIXME: Parsoid fails to sanitize this! See T58846.
!! test
Opera -o-link CSS
+!! options
+parsoid=wt2html,html2html
!! wikitext
X
-!! html
+!! html/php
X
+!! html/parsoid
+
X
!! end
!! test
@@@ -16826,7 -16794,7 +16840,7 @@@ MSIE 6 CSS safety test: Repetition mark
E
F
G
-!! html
+!! html/php
A
B
C
@@@ -16835,14 -16803,6 +16849,14 @@@
F
G
+!! html/parsoid
+
A
+
B
+
C
+
D
+
E
+
F
+
G
!! end
!! test
@@@ -16906,6 -16866,7 +16920,6 @@@ Expansion of multi-line templates in at
!! end
-
!! test
Expansion of multi-line templates in attribute values (bug 6255 sanity check)
!! wikitext
@@@ -16939,7 -16900,6 +16953,7 @@@ Tags which are hidden from Tidy cannot
###
### Parser hooks (see tests/parser/parserTestsParserHook.php for the extension)
###
+
!! test
Parser hook: empty input
!! wikitext
@@@ -18910,6 -18870,7 +18924,6 @@@ stuf
xxx
!! end
-
!! test
Handling of
in URLs
!! wikitext
@@@ -18918,7 -18879,9 +18932,7 @@@
!! end
-
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
5 quotes, code coverage +1 line
@@@ -19502,27 -19466,6 +19516,27 @@@ File:Foobar.jpg|alt=galleryalt|link=htt
!! end
+!! test
+Gallery override link with absolute external link with LanguageConverter
+!! options
+language=zh
+!! input
+
+File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
+
+!! result
+
+
+
+
+
caption
+
+
+
+
+
+!! end
+
!! test
Gallery override link with malicious javascript (T36852)
!! options
@@@ -19545,7 -19488,7 +19559,7 @@@ File:Foobar.jpg|alt=galleryalt|link=" o
!! html/parsoid
-
+
!! end
@@@ -19575,24 -19518,6 +19589,24 @@@ File:Foobar.jpg|link=
!! end
+!! test
+Serialize gallery without attrs in data-mw
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "nativeGallery": true
+}
+!! html/parsoid
+
+
123
+
File:Test.png
+
+!! wikitext
+
+File:Test.png
+
+!! end
+
!! test
HTML Hex character encoding (spells the word "JavaScript")
!! options
@@@ -19876,6 -19801,7 +19890,6 @@@ dt/dd/dl tes
!!end
-
# Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "" tag.
!! test
Images with the "|" character in the comment
@@@ -19885,7 -19811,7 +19899,7 @@@
+
!! end
!! test
@@@ -20713,28 -20639,6 +20727,28 @@@ Nested: -{zh-hans:Hi -{zh-cn:China;zh-s
# Since Parsoid is starting to emit canonical wikitext for links,
# [http://example.com http://example.com] will not RT back to that
# form anymore.
+!! test
+HTML markups with conversion syntax in attribs, nested in other conversion blocks
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{zh;zh-hans;zh-hant|A}-
+!! html
+
A
+
+!! end
+
+!! test
+HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet)
+!! options
+language=zh variant=zh-cn disabled
+!! wikitext
+-{A}-
+!! html
+
A
+
+!! end
+
!! test
Proper conversion of text in external links
!! options
@@@ -22494,6 -22398,82 +22508,6 @@@ File:foobar.jpg|caption|alt=galleryalt|
!! end
-!!test
-Gallery override link with absolute external link (bug 34852)
-!! wikitext
-
-File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
-
-!! html
-
-
-
-
-
caption
-
-
-
-
-
-!! end
-
-!! test
-Gallery override link with absolute external link with LanguageConverter
-!! options
-language=zh
-!! input
-
-File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
-
-!! result
-
-
-
-
-
caption
-
-
-
-
-
-!! end
-
-!!test
-Gallery override link with malicious javascript (bug 34852)
-!! wikitext
-
-File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
-
-!! html
-
-
-
-
-
caption
-
-
-
-
-
-!! end
-
-!!test
-Gallery with invalid title as link (bug 43964)
-!! wikitext
-
-File:foobar.jpg|link=<
-
-!! html
-
-
-
-
-
-
-
-
-!! end
-
!!test
Language parser function
!! wikitext
@@@ -22755,7 -22735,7 +22769,7 @@@ A A [1]
-