Merge "Exclude duplicate srcset urls"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 20 Jul 2016 17:39:56 +0000 (17:39 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 20 Jul 2016 17:39:56 +0000 (17:39 +0000)
1  2 
tests/parser/parserTests.txt

@@@ -35,7 -35,7 +35,7 @@@
  #
  # You can also set the following parser properties via test options:
  #  wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
 -#  wgLinkHolderBatchSize, wgRawHtml
 +#  wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic
  #
  # For testing purposes, temporary articles can created:
  # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
@@@ -8361,7 -8361,6 +8361,7 @@@ Blah blah bla
  <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
  !! end
  
 +## parsoid html2wt will lose the space variations
  !! test
  Interlanguage link with spacing
  !! options
@@@ -8392,7 -8391,6 +8392,7 @@@ Blah blah bla
  <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
  !! end
  
 +## parsoid html2wt will lose the space variations
  !! test
  Interlanguage link variations
  !! options
@@@ -8412,7 -8410,6 +8412,7 @@@ Blah blah bla
  <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
  !! end
  
 +## parsoid html2wt will normalize the space to _
  !! test
  Space and question mark encoding in interlanguage links (T95473)
  !! options
@@@ -8473,34 -8470,6 +8473,34 @@@ Blah blah bla
  <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
  !! end
  
 +## PHP parser tests script needs an update
 +## Parsoid html2wt will normalize output to [[:zh:Chinese]]
 +!! test
 +Language links render as inline links if $wgInterwikiMagic=false
 +!! options
 +wgInterwikiMagic=false
 +parsoid=wt2html,wt2wt,html2html
 +!! wikitext
 +Blah blah blah
 +[[zh:Chinese]]
 +!! html/parsoid
 +<p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
 +!! end
 +
 +## PHP parser tests script needs an update
 +## Parsoid html2wt will normalize output to [[:zh:Chinese]]
 +!! test
 +Language links render as inline links in the Talk namespace
 +!! options
 +title=Talk:Foo
 +parsoid=wt2html,wt2wt,html2html
 +!! wikitext
 +Blah blah blah
 +[[zh:Chinese]]
 +!! html/parsoid
 +<p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
 +!! end
 +
  !! test
  Parsoid-specific test: Wikilinks with &nbsp; should RT properly
  !! options
@@@ -18858,7 -18827,7 +18858,7 @@@ File:Foobar.jp
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
 -<p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
 +<p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
  caption
  </p>
                        </div>
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
 -<p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
 +<p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
  </p>
                        </div>
                </div></li>
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
                        <div class="gallerytext">
 -<p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
 +<p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
  some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
  </p>
                        </div>
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
                        <div class="gallerytext">
 -<p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
 +<p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
  </p>
                        </div>
                </div></li>
@@@ -27096,21 -27065,6 +27096,21 @@@ B <ref group="X" name="b" /
  </references>
  !! end
  
 +!! test
 +DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
 +!! options
 +parsoid={
 +  "modes": ["selser"],
 +  "changes": [
 +    [ "div:first-child", "text", "bar" ]
 +  ]
 +}
 +!! wikitext
 +<div style="{{1x|color:red;}}%">foo</div>
 +!! wikitext/edited
 +<div style="{{1x|color:red;}}%">bar</div>
 +!! end
 +
  !! test
  Empty LI (T49673)
  !! wikitext
  <li>b</li>
  </ul>
  !! end
+ !! test
+ Thumbnail output
+ !! wikitext
+ [[File:Thumb.png|thumb]]
+ !! html/php+tidy
+ <div class="thumb tright">
+ <div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a>
+ <div class="thumbcaption">
+ <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
+ </div>
+ </div>
+ </div>
+ !! end