From 43b0016bd485da2aba2532b4bc25a89d4bc6f61d Mon Sep 17 00:00:00 2001
From: "C. Scott Ananian"
Date: Fri, 2 Nov 2018 13:31:44 -0400
Subject: [PATCH] Sync up with Parsoid parserTests.txt
This now aligns with Parsoid commit 24b6363b9a99435479305fa98651b07e2ddb118a
Change-Id: I9090541605411af1ff3b4252b2e0902736e1ed48
---
tests/parser/parserTests.txt | 82 +++++++++++++++++++++++++++++++++---
1 file changed, 76 insertions(+), 6 deletions(-)
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 25ac5f5a1f..dc7cafbc0c 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -22098,6 +22098,8 @@ wgRawHtml=1
!! html/php
+!! html/parsoid
+
!! end
!! test
@@ -25235,9 +25237,30 @@ __TOC__
+!! html/parsoid
+
+Style
+!! end
+
+!! test
+T198618: script element in ToC
+!! options
+wgRawHtml=1
+!! wikitext
+__TOC__
+==Script==
+!! html/php
+
+
+
+
!! html/parsoid
-Style
+Script
!! end
!! test
@@ -30374,15 +30397,14 @@ parsoid={
"modes": ["selser"],
"scrubWikitext": true,
"changes": [
- [ "#x", "after", "
\n x
"]
+ [ "#x", "after", "
\n bar
"]
]
}
!! wikitext
-foo
+foo
!! wikitext/edited
-foo
-
-x
+foo
+bar
!! end
!! test
@@ -31034,8 +31056,18 @@ styletag=1
+!! html/parsoid
+
+
+
+
!! end
+## Right now, Parsoid doesn't de-duplicate style tags.
+## So, we shouldn't see link tags that need to bypass the sanitizer.
+## In a followup patch, when we de-duplicate style tags and
+## introduce link tags, we'll add a hook for link tags in
+## the parser test runner script.
!! test
Validating that
bar
+!! html/parsoid
+A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
+
+
+
+ <link rel="foo" href="bar"/>
+
+But if it's on a line with other content, let it be wrapped.
+
+ bar
+
+foo
+
+foo bar
+
+And the same if we have non-paragraph-breaking whitespace
+
+foo
+
+bar
!! end
!! test
@@ -31116,6 +31168,24 @@ bar
!! end
+!! test
+Extension returning multiple nodes starting with a style tag roundtrips
+!! options
+wgRawHtml=1
+!! wikitext
+
+!! html/parsoid
+
+
+!! end
+
!! test
Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
!! config
--
2.20.1