瀏覽代碼

Tests: List Safari tests. Tests utils refactoring.

Krzysztof Krztoń 7 年之前
父節點
當前提交
62cf9e6a2f
共有 21 個文件被更改,包括 2766 次插入139 次删除
  1. 163 0
      packages/ckeditor5-paste-from-office/tests/_data/list/heading1/input.safari.word2016.html
  2. 15 0
      packages/ckeditor5-paste-from-office/tests/_data/list/heading1/normalized.safari.word2016.html
  3. 180 0
      packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/input.safari.word2016.html
  4. 13 0
      packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/normalized.safari.word2016.html
  5. 170 0
      packages/ckeditor5-paste-from-office/tests/_data/list/heading7/input.safari.word2016.html
  6. 9 0
      packages/ckeditor5-paste-from-office/tests/_data/list/heading7/normalized.safari.word2016.html
  7. 90 0
      packages/ckeditor5-paste-from-office/tests/_data/list/index.js
  8. 847 0
      packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/input.safari.word2016.html
  9. 113 0
      packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/normalized.safari.word2016.html
  10. 258 0
      packages/ckeditor5-paste-from-office/tests/_data/list/multiple-combined/input.safari.word2016.html
  11. 31 0
      packages/ckeditor5-paste-from-office/tests/_data/list/multiple-combined/normalized.safari.word2016.html
  12. 280 0
      packages/ckeditor5-paste-from-office/tests/_data/list/multiple/input.safari.word2016.html
  13. 25 0
      packages/ckeditor5-paste-from-office/tests/_data/list/multiple/normalized.safari.word2016.html
  14. 208 0
      packages/ckeditor5-paste-from-office/tests/_data/list/simple/input.safari.word2016.html
  15. 15 0
      packages/ckeditor5-paste-from-office/tests/_data/list/simple/normalized.safari.word2016.html
  16. 245 0
      packages/ckeditor5-paste-from-office/tests/_data/list/styled/input.safari.word2016.html
  17. 23 0
      packages/ckeditor5-paste-from-office/tests/_data/list/styled/normalized.safari.word2016.html
  18. 5 2
      packages/ckeditor5-paste-from-office/tests/_utils/fixtures.js
  19. 48 68
      packages/ckeditor5-paste-from-office/tests/_utils/utils.js
  20. 14 42
      packages/ckeditor5-paste-from-office/tests/data/integration/list.js
  21. 14 27
      packages/ckeditor5-paste-from-office/tests/data/normalization/list.js

+ 163 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/heading1/input.safari.word2016.html

@@ -0,0 +1,163 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+	  xmlns:w="urn:schemas-microsoft-com:office:word"
+	  xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
+	  xmlns="http://www.w3.org/TR/REC-html40"><head><style class="WebKit-mso-list-quirks-style">
+	<!--
+	/* Style Definitions */
+	p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-parent:"";
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:0cm;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	h1
+	{mso-style-priority:9;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-link:"Heading 1 Char";
+		mso-style-next:Normal;
+		margin-top:12.0pt;
+		margin-right:0cm;
+		margin-bottom:0cm;
+		margin-left:0cm;
+		margin-bottom:.0001pt;
+		line-height:107%;
+		mso-pagination:widow-orphan lines-together;
+		page-break-after:avoid;
+		mso-outline-level:1;
+		font-size:16.0pt;
+		font-family:"Calibri Light",sans-serif;
+		mso-ascii-font-family:"Calibri Light";
+		mso-ascii-theme-font:major-latin;
+		mso-fareast-font-family:"Yu Gothic Light";
+		mso-fareast-theme-font:major-fareast;
+		mso-hansi-font-family:"Calibri Light";
+		mso-hansi-theme-font:major-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:major-bidi;
+		color:#2F5496;
+		mso-themecolor:accent1;
+		mso-themeshade:191;
+		mso-font-kerning:0pt;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;
+		font-weight:normal;}
+	span.Heading1Char
+	{mso-style-name:"Heading 1 Char";
+		mso-style-priority:9;
+		mso-style-unhide:no;
+		mso-style-locked:yes;
+		mso-style-link:"Heading 1";
+		mso-ansi-font-size:16.0pt;
+		mso-bidi-font-size:16.0pt;
+		font-family:"Calibri Light",sans-serif;
+		mso-ascii-font-family:"Calibri Light";
+		mso-ascii-theme-font:major-latin;
+		mso-fareast-font-family:"Yu Gothic Light";
+		mso-fareast-theme-font:major-fareast;
+		mso-hansi-font-family:"Calibri Light";
+		mso-hansi-theme-font:major-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:major-bidi;
+		color:#2F5496;
+		mso-themecolor:accent1;
+		mso-themeshade:191;}
+	.MsoChpDefault
+	{mso-style-type:export-only;
+		mso-default-props:yes;
+		font-size:11.0pt;
+		mso-ansi-font-size:11.0pt;
+		mso-bidi-font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	.MsoPapDefault
+	{mso-style-type:export-only;
+		margin-bottom:8.0pt;
+		line-height:107%;}
+	@page WordSection1
+	{size:612.0pt 792.0pt;
+		margin:72.0pt 72.0pt 72.0pt 72.0pt;
+		mso-header-margin:36.0pt;
+		mso-footer-margin:36.0pt;
+		mso-paper-source:0;}
+	div.WordSection1
+	{page:WordSection1;}
+	/* List Definitions */
+	@list l0
+	{mso-list-id:805243082;
+		mso-list-type:hybrid;
+		mso-list-template-ids:-1568012680 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
+	@list l0:level1
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level2
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level3
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l0:level4
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level5
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level6
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l0:level7
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level8
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level9
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+
+	-->
+</style></head><h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span style="mso-fareast-font-family:&quot;Calibri Light&quot;;mso-fareast-theme-font:major-latin;
+mso-bidi-font-family:&quot;Calibri Light&quot;;mso-bidi-theme-font:major-latin;
+mso-ansi-language:PL"><span style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">  </span></span></span><!--[endif]--><span>H1 1<o:p></o:p></span></h1><h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span style="mso-fareast-font-family:&quot;Calibri Light&quot;;mso-fareast-theme-font:major-latin;
+mso-bidi-font-family:&quot;Calibri Light&quot;;mso-bidi-theme-font:major-latin;
+mso-ansi-language:PL"><span style="mso-list:Ignore">2.<span style="font:7.0pt &quot;Times New Roman&quot;">  </span></span></span><!--[endif]--><span>H1 2<o:p></o:p></span></h1></html>

+ 15 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/heading1/normalized.safari.word2016.html

@@ -0,0 +1,15 @@
+<ol>
+	<li style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:&quot;Calibri Light&quot;;mso-fareast-theme-font:major-latin;
+	mso-bidi-font-family:&quot;Calibri Light&quot;;mso-bidi-theme-font:major-latin;
+	mso-ansi-language:PL"></span><!--[endif]-->
+		<span>H1 1<o:p></o:p></span>
+	</li>
+
+	<li style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:&quot;Calibri Light&quot;;mso-fareast-theme-font:major-latin;
+	mso-bidi-font-family:&quot;Calibri Light&quot;;mso-bidi-theme-font:major-latin;
+	mso-ansi-language:PL"></span><!--[endif]-->
+		<span>H1 2<o:p></o:p></span>
+	</li>
+</ol>

+ 180 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/input.safari.word2016.html

@@ -0,0 +1,180 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+	  xmlns:w="urn:schemas-microsoft-com:office:word"
+	  xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
+	  xmlns="http://www.w3.org/TR/REC-html40"><head><style class="WebKit-mso-list-quirks-style">
+	<!--
+	/* Style Definitions */
+	p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-parent:"";
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:0cm;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	h3
+	{mso-style-priority:9;
+		mso-style-qformat:yes;
+		mso-style-link:"Heading 3 Char";
+		mso-style-next:Normal;
+		margin-top:2.0pt;
+		margin-right:0cm;
+		margin-bottom:0cm;
+		margin-left:0cm;
+		margin-bottom:.0001pt;
+		line-height:107%;
+		mso-pagination:widow-orphan lines-together;
+		page-break-after:avoid;
+		mso-outline-level:3;
+		font-size:12.0pt;
+		font-family:"Calibri Light",sans-serif;
+		mso-ascii-font-family:"Calibri Light";
+		mso-ascii-theme-font:major-latin;
+		mso-fareast-font-family:"Yu Gothic Light";
+		mso-fareast-theme-font:major-fareast;
+		mso-hansi-font-family:"Calibri Light";
+		mso-hansi-theme-font:major-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:major-bidi;
+		color:#1F3763;
+		mso-themecolor:accent1;
+		mso-themeshade:127;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;
+		font-weight:normal;}
+	span.Heading3Char
+	{mso-style-name:"Heading 3 Char";
+		mso-style-priority:9;
+		mso-style-unhide:no;
+		mso-style-locked:yes;
+		mso-style-link:"Heading 3";
+		mso-ansi-font-size:12.0pt;
+		mso-bidi-font-size:12.0pt;
+		font-family:"Calibri Light",sans-serif;
+		mso-ascii-font-family:"Calibri Light";
+		mso-ascii-theme-font:major-latin;
+		mso-fareast-font-family:"Yu Gothic Light";
+		mso-fareast-theme-font:major-fareast;
+		mso-hansi-font-family:"Calibri Light";
+		mso-hansi-theme-font:major-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:major-bidi;
+		color:#1F3763;
+		mso-themecolor:accent1;
+		mso-themeshade:127;}
+	.MsoChpDefault
+	{mso-style-type:export-only;
+		mso-default-props:yes;
+		font-size:11.0pt;
+		mso-ansi-font-size:11.0pt;
+		mso-bidi-font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	.MsoPapDefault
+	{mso-style-type:export-only;
+		margin-bottom:8.0pt;
+		line-height:107%;}
+	@page WordSection1
+	{size:612.0pt 792.0pt;
+		margin:72.0pt 72.0pt 72.0pt 72.0pt;
+		mso-header-margin:36.0pt;
+		mso-footer-margin:36.0pt;
+		mso-paper-source:0;}
+	div.WordSection1
+	{page:WordSection1;}
+	/* List Definitions */
+	@list l0
+	{mso-list-id:479226091;
+		mso-list-type:hybrid;
+		mso-list-template-ids:-1827736892 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
+	@list l0:level1
+	{mso-level-number-format:bullet;
+		mso-level-text:;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:Symbol;}
+	@list l0:level2
+	{mso-level-number-format:bullet;
+		mso-level-text:o;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:"Courier New";}
+	@list l0:level3
+	{mso-level-number-format:bullet;
+		mso-level-text:;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:Wingdings;}
+	@list l0:level4
+	{mso-level-number-format:bullet;
+		mso-level-text:;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:Symbol;}
+	@list l0:level5
+	{mso-level-number-format:bullet;
+		mso-level-text:o;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:"Courier New";}
+	@list l0:level6
+	{mso-level-number-format:bullet;
+		mso-level-text:;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:Wingdings;}
+	@list l0:level7
+	{mso-level-number-format:bullet;
+		mso-level-text:;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:Symbol;}
+	@list l0:level8
+	{mso-level-number-format:bullet;
+		mso-level-text:o;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:"Courier New";}
+	@list l0:level9
+	{mso-level-number-format:bullet;
+		mso-level-text:;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;
+		font-family:Wingdings;}
+
+	-->
+</style></head><h3 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:PL"><span style="mso-list:Ignore">·<span style="font:7.0pt &quot;Times New Roman&quot;">     <span class="Apple-converted-space"> </span></span></span></span><!--[endif]--><span>H<b>2 1</b><o:p></o:p></span></h3><h3 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:PL"><span style="mso-list:Ignore">·<span style="font:7.0pt &quot;Times New Roman&quot;">     <span class="Apple-converted-space"> </span></span></span></span><!--[endif]--><i><u><span>H</span></u></i><u><span>2</span></u><span>2<o:p></o:p></span></h3></html>

+ 13 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/normalized.safari.word2016.html

@@ -0,0 +1,13 @@
+<ul>
+	<li style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+	Symbol;mso-ansi-language:PL"></span><!--[endif]-->
+		<span>H<b>2 1</b><o:p></o:p></span>
+	</li>
+
+	<li style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+	Symbol;mso-ansi-language:PL"></span><!--[endif]-->
+		<i><u><span>H</span></u></i><u><span>2</span></u><span>2<o:p></o:p></span>
+	</li>
+</ul>

+ 170 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/heading7/input.safari.word2016.html

@@ -0,0 +1,170 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+	  xmlns:w="urn:schemas-microsoft-com:office:word"
+	  xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
+	  xmlns="http://www.w3.org/TR/REC-html40"><head><style class="WebKit-mso-list-quirks-style">
+	<!--
+	/* Style Definitions */
+	p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-parent:"";
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:0cm;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
+	{mso-style-priority:9;
+		mso-style-qformat:yes;
+		mso-style-link:"Heading 7 Char";
+		mso-style-next:Normal;
+		margin-top:2.0pt;
+		margin-right:0cm;
+		margin-bottom:0cm;
+		margin-left:0cm;
+		margin-bottom:.0001pt;
+		line-height:107%;
+		mso-pagination:widow-orphan lines-together;
+		page-break-after:avoid;
+		mso-outline-level:7;
+		font-size:11.0pt;
+		font-family:"Calibri Light",sans-serif;
+		mso-ascii-font-family:"Calibri Light";
+		mso-ascii-theme-font:major-latin;
+		mso-fareast-font-family:"Yu Gothic Light";
+		mso-fareast-theme-font:major-fareast;
+		mso-hansi-font-family:"Calibri Light";
+		mso-hansi-theme-font:major-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:major-bidi;
+		color:#1F3763;
+		mso-themecolor:accent1;
+		mso-themeshade:127;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;
+		font-style:italic;}
+	span.Heading7Char
+	{mso-style-name:"Heading 7 Char";
+		mso-style-priority:9;
+		mso-style-unhide:no;
+		mso-style-locked:yes;
+		mso-style-link:"Heading 7";
+		font-family:"Calibri Light",sans-serif;
+		mso-ascii-font-family:"Calibri Light";
+		mso-ascii-theme-font:major-latin;
+		mso-fareast-font-family:"Yu Gothic Light";
+		mso-fareast-theme-font:major-fareast;
+		mso-hansi-font-family:"Calibri Light";
+		mso-hansi-theme-font:major-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:major-bidi;
+		color:#1F3763;
+		mso-themecolor:accent1;
+		mso-themeshade:127;
+		font-style:italic;}
+	.MsoChpDefault
+	{mso-style-type:export-only;
+		mso-default-props:yes;
+		font-size:11.0pt;
+		mso-ansi-font-size:11.0pt;
+		mso-bidi-font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	.MsoPapDefault
+	{mso-style-type:export-only;
+		margin-bottom:8.0pt;
+		line-height:107%;}
+	@page WordSection1
+	{size:612.0pt 792.0pt;
+		margin:72.0pt 72.0pt 72.0pt 72.0pt;
+		mso-header-margin:36.0pt;
+		mso-footer-margin:36.0pt;
+		mso-paper-source:0;}
+	div.WordSection1
+	{page:WordSection1;}
+	/* List Definitions */
+	@list l0
+	{mso-list-id:1763799148;
+		mso-list-template-ids:67698719;}
+	@list l0:level1
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:18.0pt;
+		text-indent:-18.0pt;}
+	@list l0:level2
+	{mso-level-text:"%1\.%2\.";
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:39.6pt;
+		text-indent:-21.6pt;}
+	@list l0:level3
+	{mso-level-text:"%1\.%2\.%3\.";
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:61.2pt;
+		text-indent:-25.2pt;}
+	@list l0:level4
+	{mso-level-text:"%1\.%2\.%3\.%4\.";
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:86.4pt;
+		text-indent:-32.4pt;}
+	@list l0:level5
+	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:111.6pt;
+		text-indent:-39.6pt;}
+	@list l0:level6
+	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:136.8pt;
+		text-indent:-46.8pt;}
+	@list l0:level7
+	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:162.0pt;
+		text-indent:-54.0pt;}
+	@list l0:level8
+	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:187.2pt;
+		text-indent:-61.2pt;}
+	@list l0:level9
+	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		margin-left:216.0pt;
+		text-indent:-72.0pt;}
+
+	-->
+</style></head><p class="MsoHeading7" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:
+l0 level1 lfo1"><!--[if !supportLists]--><span style="mso-fareast-font-family:&quot;Calibri Light&quot;;
+mso-fareast-theme-font:major-latin;mso-bidi-font-family:&quot;Calibri Light&quot;;
+mso-bidi-theme-font:major-latin;mso-ansi-language:PL"><span style="mso-list:
+Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">    <span class="Apple-converted-space"> </span></span></span></span><!--[endif]--><span>H 7<o:p></o:p></span></p></html>

+ 9 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/heading7/normalized.safari.word2016.html

@@ -0,0 +1,9 @@
+<ol>
+	<li class="MsoHeading7" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:
+	l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:&quot;Calibri Light&quot;;
+	mso-fareast-theme-font:major-latin;mso-bidi-font-family:&quot;Calibri Light&quot;;
+	mso-bidi-theme-font:major-latin;mso-ansi-language:PL"></span><!--[endif]-->
+		<span>H 7<o:p></o:p></span>
+	</li>
+</ol>

+ 90 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/index.js

@@ -0,0 +1,90 @@
+/**
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+// Default.
+import simple from './simple/input.word2016.html';
+import styled from './styled/input.word2016.html';
+import multiple from './multiple/input.word2016.html';
+import multipleCombined from './multiple-combined/input.word2016.html';
+import manyOneItem from './many-one-item/input.word2016.html';
+import heading1 from './heading1/input.word2016.html';
+import heading3Styled from './heading3-styled/input.word2016.html';
+import heading7 from './heading7/input.word2016.html';
+
+import simpleNormalized from './simple/normalized.word2016.html';
+import styledNormalized from './styled/normalized.word2016.html';
+import multipleNormalized from './multiple/normalized.word2016.html';
+import multipleCombinedNormalized from './multiple-combined/normalized.word2016.html';
+import manyOneItemNormalized from './many-one-item/normalized.word2016.html';
+import heading1Normalized from './heading1/normalized.word2016.html';
+import heading3StyledNormalized from './heading3-styled/normalized.word2016.html';
+import heading7Normalized from './heading7/normalized.word2016.html';
+
+export const fixtures = {
+	input: {
+		simple,
+		styled,
+		multiple,
+		multipleCombined,
+		manyOneItem,
+		heading1,
+		heading3Styled,
+		heading7
+	},
+	normalized: {
+		simple: simpleNormalized,
+		styled: styledNormalized,
+		multiple: multipleNormalized,
+		multipleCombined: multipleCombinedNormalized,
+		manyOneItem: manyOneItemNormalized,
+		heading1: heading1Normalized,
+		heading3Styled: heading3StyledNormalized,
+		heading7: heading7Normalized
+	}
+};
+
+// Safari.
+import simpleSafari from './simple/input.safari.word2016.html';
+import styledSafari from './styled/input.safari.word2016.html';
+import multipleSafari from './multiple/input.safari.word2016.html';
+import multipleCombinedSafari from './multiple-combined/input.safari.word2016.html';
+import manyOneItemSafari from './many-one-item/input.safari.word2016.html';
+import heading1Safari from './heading1/input.safari.word2016.html';
+import heading3StyledSafari from './heading3-styled/input.safari.word2016.html';
+import heading7Safari from './heading7/input.safari.word2016.html';
+
+import simpleNormalizedSafari from './simple/normalized.safari.word2016.html';
+import styledNormalizedSafari from './styled/normalized.safari.word2016.html';
+import multipleNormalizedSafari from './multiple/normalized.safari.word2016.html';
+import multipleCombinedNormalizedSafari from './multiple-combined/normalized.safari.word2016.html';
+import manyOneItemNormalizedSafari from './many-one-item/normalized.safari.word2016.html';
+import heading1NormalizedSafari from './heading1/normalized.safari.word2016.html';
+import heading3StyledNormalizedSafari from './heading3-styled/normalized.safari.word2016.html';
+import heading7NormalizedSafari from './heading7/normalized.safari.word2016.html';
+
+export const browserFixtures = {
+	safari: {
+		input: {
+			simple: simpleSafari,
+			styled: styledSafari,
+			multiple: multipleSafari,
+			multipleCombined: multipleCombinedSafari,
+			manyOneItem: manyOneItemSafari,
+			heading1: heading1Safari,
+			heading3Styled: heading3StyledSafari,
+			heading7: heading7Safari
+		},
+		normalized: {
+			simple: simpleNormalizedSafari,
+			styled: styledNormalizedSafari,
+			multiple: multipleNormalizedSafari,
+			multipleCombined: multipleCombinedNormalizedSafari,
+			manyOneItem: manyOneItemNormalizedSafari,
+			heading1: heading1NormalizedSafari,
+			heading3Styled: heading3StyledNormalizedSafari,
+			heading7: heading7NormalizedSafari
+		}
+	}
+};

File diff suppressed because it is too large
+ 847 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/input.safari.word2016.html


File diff suppressed because it is too large
+ 113 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/normalized.safari.word2016.html


+ 258 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/multiple-combined/input.safari.word2016.html

@@ -0,0 +1,258 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+	  xmlns:w="urn:schemas-microsoft-com:office:word"
+	  xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
+	  xmlns="http://www.w3.org/TR/REC-html40"><head><style class="WebKit-mso-list-quirks-style">
+	<!--
+	/* Style Definitions */
+	p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-parent:"";
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:0cm;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
+	{mso-style-priority:34;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:36.0pt;
+		mso-add-space:auto;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
+	{mso-style-priority:34;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-type:export-only;
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:0cm;
+		margin-left:36.0pt;
+		margin-bottom:.0001pt;
+		mso-add-space:auto;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
+	{mso-style-priority:34;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-type:export-only;
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:0cm;
+		margin-left:36.0pt;
+		margin-bottom:.0001pt;
+		mso-add-space:auto;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
+	{mso-style-priority:34;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-type:export-only;
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:36.0pt;
+		mso-add-space:auto;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	.MsoChpDefault
+	{mso-style-type:export-only;
+		mso-default-props:yes;
+		font-size:11.0pt;
+		mso-ansi-font-size:11.0pt;
+		mso-bidi-font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	.MsoPapDefault
+	{mso-style-type:export-only;
+		margin-bottom:8.0pt;
+		line-height:107%;}
+	@page WordSection1
+	{size:612.0pt 792.0pt;
+		margin:72.0pt 72.0pt 72.0pt 72.0pt;
+		mso-header-margin:36.0pt;
+		mso-footer-margin:36.0pt;
+		mso-paper-source:0;}
+	div.WordSection1
+	{page:WordSection1;}
+	/* List Definitions */
+	@list l0
+	{mso-list-id:164786957;
+		mso-list-type:hybrid;
+		mso-list-template-ids:-1315690950 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
+	@list l0:level1
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level2
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level3
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l0:level4
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level5
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level6
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l0:level7
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level8
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level9
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l1
+	{mso-list-id:984899113;
+		mso-list-type:hybrid;
+		mso-list-template-ids:-846005604 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
+	@list l1:level1
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l1:level2
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l1:level3
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l1:level4
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l1:level5
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l1:level6
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l1:level7
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l1:level8
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l1:level9
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+
+	-->
+</style></head><p class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"><!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+PL"><span style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">    </span></span></span><!--[endif]--><span>Item1<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"><!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+PL"><span style="mso-list:Ignore">2.<span style="font:7.0pt &quot;Times New Roman&quot;">    </span></span></span><!--[endif]--><span>Item 2<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+PL"><span style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">    </span></span></span><!--[endif]--><span>Item 1<o:p></o:p></span></p><p class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+PL"><span style="mso-list:Ignore">2.<span style="font:7.0pt &quot;Times New Roman&quot;">    </span></span></span><!--[endif]--><span>Item2<o:p></o:p></span></p></html>

+ 31 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/multiple-combined/normalized.safari.word2016.html

@@ -0,0 +1,31 @@
+<ol>
+	<li class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+	PL"></span><!--[endif]-->
+		<span>Item1<o:p></o:p></span>
+	</li>
+
+	<li class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+	PL"></span><!--[endif]-->
+		<span>Item 2<o:p></o:p></span>
+	</li>
+</ol>
+
+<ol>
+	<li class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+	PL"></span><!--[endif]-->
+		<span>Item 1<o:p></o:p></span>
+	</li>
+
+	<li class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+	PL"></span><!--[endif]-->
+		<span>Item2<o:p></o:p></span>
+	</li>
+</ol>

File diff suppressed because it is too large
+ 280 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/multiple/input.safari.word2016.html


File diff suppressed because it is too large
+ 25 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/multiple/normalized.safari.word2016.html


+ 208 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/simple/input.safari.word2016.html

@@ -0,0 +1,208 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+	  xmlns:w="urn:schemas-microsoft-com:office:word"
+	  xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
+	  xmlns="http://www.w3.org/TR/REC-html40"><head><style class="WebKit-mso-list-quirks-style">
+	<!--
+	/* Style Definitions */
+	p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-parent:"";
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:0cm;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
+	{mso-style-priority:34;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:36.0pt;
+		mso-add-space:auto;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
+	{mso-style-priority:34;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-type:export-only;
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:0cm;
+		margin-left:36.0pt;
+		margin-bottom:.0001pt;
+		mso-add-space:auto;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
+	{mso-style-priority:34;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-type:export-only;
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:0cm;
+		margin-left:36.0pt;
+		margin-bottom:.0001pt;
+		mso-add-space:auto;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
+	{mso-style-priority:34;
+		mso-style-unhide:no;
+		mso-style-qformat:yes;
+		mso-style-type:export-only;
+		margin-top:0cm;
+		margin-right:0cm;
+		margin-bottom:8.0pt;
+		margin-left:36.0pt;
+		mso-add-space:auto;
+		line-height:107%;
+		mso-pagination:widow-orphan;
+		font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	.MsoChpDefault
+	{mso-style-type:export-only;
+		mso-default-props:yes;
+		font-size:11.0pt;
+		mso-ansi-font-size:11.0pt;
+		mso-bidi-font-size:11.0pt;
+		font-family:"Calibri",sans-serif;
+		mso-ascii-font-family:Calibri;
+		mso-ascii-theme-font:minor-latin;
+		mso-fareast-font-family:"Yu Mincho";
+		mso-fareast-theme-font:minor-fareast;
+		mso-hansi-font-family:Calibri;
+		mso-hansi-theme-font:minor-latin;
+		mso-bidi-font-family:"Times New Roman";
+		mso-bidi-theme-font:minor-bidi;
+		mso-ansi-language:EN-US;
+		mso-fareast-language:JA;}
+	.MsoPapDefault
+	{mso-style-type:export-only;
+		margin-bottom:8.0pt;
+		line-height:107%;}
+	@page WordSection1
+	{size:612.0pt 792.0pt;
+		margin:72.0pt 72.0pt 72.0pt 72.0pt;
+		mso-header-margin:36.0pt;
+		mso-footer-margin:36.0pt;
+		mso-paper-source:0;}
+	div.WordSection1
+	{page:WordSection1;}
+	/* List Definitions */
+	@list l0
+	{mso-list-id:984899113;
+		mso-list-type:hybrid;
+		mso-list-template-ids:-846005604 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
+	@list l0:level1
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level2
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level3
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l0:level4
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level5
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level6
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+	@list l0:level7
+	{mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level8
+	{mso-level-number-format:alpha-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:left;
+		text-indent:-18.0pt;}
+	@list l0:level9
+	{mso-level-number-format:roman-lower;
+		mso-level-tab-stop:none;
+		mso-level-number-position:right;
+		text-indent:-9.0pt;}
+
+	-->
+</style></head><p class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+PL"><span style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">    </span></span></span><!--[endif]--><span>Item1<o:p></o:p></span></p><p class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+PL"><span style="mso-list:Ignore">2.<span style="font:7.0pt &quot;Times New Roman&quot;">    </span></span></span><!--[endif]--><span>Item 2<o:p></o:p></span></p></html>

+ 15 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/simple/normalized.safari.word2016.html

@@ -0,0 +1,15 @@
+<ol>
+	<li class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+	PL"></span><!--[endif]-->
+		<span>Item1<o:p></o:p></span>
+	</li>
+
+	<li class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
+	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
+	PL"></span><!--[endif]-->
+		<span>Item 2<o:p></o:p></span>
+	</li>
+</ol>

File diff suppressed because it is too large
+ 245 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/styled/input.safari.word2016.html


+ 23 - 0
packages/ckeditor5-paste-from-office/tests/_data/list/styled/normalized.safari.word2016.html

@@ -0,0 +1,23 @@
+<p class="MsoNormal" style="margin: 0cm 0cm 8pt; line-height: 15.693333625793457px; font-size: 11pt; font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">
+	<span>List:<o:p></o:p></span>
+</p>
+
+<ul>
+	<li class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+	Symbol;mso-ansi-language:PL"></span><!--[endif]-->
+		<span>B<b>old</b><o:p></o:p></span>
+	</li>
+
+	<li class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+	Symbol;mso-ansi-language:PL"></span><!--[endif]-->
+		<span class="MsoHyperlink" style="color: rgb(5, 99, 193); text-decoration: underline;"><span><a href="https://cksource.com/" style="color: rgb(149, 79, 114); text-decoration: underline;">Lin</a></span></span><span>k<o:p></o:p></span>
+	</li>
+
+	<li class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
+		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+	Symbol;mso-ansi-language:PL"></span><!--[endif]-->
+		<i><span>M<b>ul<u>tip</u></b><u>le</u><o:p></o:p></span></i>
+	</li>
+</ul>

+ 5 - 2
packages/ckeditor5-paste-from-office/tests/_utils/fixtures.js

@@ -8,17 +8,20 @@ import { getBrowserName } from './utils';
 import { fixtures as basicStyles, browserFixtures as basicStylesBrowser } from '../_data/basic-styles/index.js';
 import { fixtures as link, browserFixtures as linkBrowser } from '../_data/link/index.js';
 import { fixtures as spacing, browserFixtures as spacingBrowser } from '../_data/spacing/index.js';
+import { fixtures as list, browserFixtures as listBrowser } from '../_data/list/index.js';
 
 const fixtures = {
 	'basic-styles': basicStyles,
 	link,
-	spacing
+	spacing,
+	list
 };
 
 const browserFixtures = {
 	'basic-styles': basicStylesBrowser,
 	link: linkBrowser,
-	spacing: spacingBrowser
+	spacing: spacingBrowser,
+	list: listBrowser
 };
 
 export function getFixtures( group ) {

+ 48 - 68
packages/ckeditor5-paste-from-office/tests/_utils/utils.js

@@ -7,52 +7,36 @@
 
 import normalizeHtml from '@ckeditor/ckeditor5-utils/tests/_utils/normalizehtml';
 
-import { getData as getModelData, stringify as stringifyModel } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
-import { stringify, getData as getViewData } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';
+import { stringify as stringifyModel } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
+import { stringify as stringifyView } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';
 
 /**
- * Checks whether for a given editor instance pasting specific content (input) gives expected result (output).
+ * Compares two models string representations. The input HTML is processed through paste
+ * pipeline where it is transformed into model. This function hooks into {@link module:engine/model/model~Model#insertContent}
+ * to get the model representation before it is inserted.
  *
- * @param {module:core/editor/editor~Editor} editor
- * @param {String} input Data to paste.
- * @param {String} expectedModel Expected model.
- * @param {String} [expectedView=null] Expected view.
+ * @param {module:core/editor/editor~Editor} editor Editor instance.
+ * @param {String} input Input HTML which will be pasted into the editor.
+ * @param {String} expected Expected model.
  */
-export function expectPaste( editor, input, expectedModel, expectedView = null ) {
-	pasteHtml( editor, input );
-
-	expect( getModelData( editor.model ) ).to.equal( expectedModel );
+export function expectModel( editor, input, expected ) {
+	const editorModel = editor.model;
+	const insertContent = editorModel.insertContent;
 
-	if ( expectedView ) {
-		expect( getViewData( editor.editing.view ) ).to.equal( expectedView );
-	}
-}
+	let actual = '';
 
-/**
- * Fires paste event on a given editor instance with a specific HTML data.
- *
- * @param {module:core/editor/editor~Editor} editor Editor instance on which paste event will be fired.
- * @param {String} html The HTML data with which paste event will be fired.
- */
-export function pasteHtml( editor, html ) {
-	editor.editing.view.document.fire( 'paste', {
-		dataTransfer: createDataTransfer( { 'text/html': html } ),
-		preventDefault() {}
+	sinon.stub( editorModel, 'insertContent' ).callsFake( ( content, selection ) => {
+		// Save model string representation now as it may change after `insertContent()` function call
+		// so accessing it later may not work as it may have empty/changed structure.
+		actual = stringifyModel( content );
+		insertContent.call( editorModel, content, selection );
 	} );
-}
 
-/**
- * Mocks dataTransfer object which can be used for simulating paste.
- *
- * @param {Object} data Object containing "mime type - data" pairs.
- * @returns {Object} DataTransfer mock object.
- */
-export function createDataTransfer( data ) {
-	return {
-		getData( type ) {
-			return data[ type ];
-		}
-	};
+	pasteHtml( editor, input );
+
+	sinon.restore();
+
+	expect( actual ).to.equal( expected );
 }
 
 /**
@@ -60,7 +44,7 @@ export function createDataTransfer( data ) {
  *
  * This function is designed for comparing normalized data so expected input is preprocessed before comparing:
  *
- *		* Tabs on the lines beginning are removed.
+ *		* Tabs on the lines beginnings are removed.
  *		* Line breaks and empty lines are removed.
  *
  * The expected input should be prepared in the above in mind which means every element containing text nodes must start
@@ -75,52 +59,37 @@ export function createDataTransfer( data ) {
  * 			<o:p></o:p>
  * 		</span>
  *
- * 	because tabulator preceding `03` text will be treated as formatting character and will be removed.
+ * 	because tab preceding `03` text will be treated as formatting character and will be removed.
  *
- * @param {String} actual
- * @param {String} expected
+ * @param {String} actual Actual HTML.
+ * @param {String} expected Expected HTML.
  */
 export function expectNormalized( actual, expected ) {
 	const expectedInlined = expected
-		// Replace tabs on the lines beginning as normalized input files are formatted.
+	// Replace tabs on the lines beginning as normalized input files are formatted.
 		.replace( /^\t*</gm, '<' )
 		// Replace line breaks (after closing tags) too.
 		.replace( /[\r\n]/gm, '' );
 
 	// We are ok with both spaces and non-breaking spaces in the actual content.
 	// Replace `&nbsp;` with regular spaces to align with expected content (where regular spaces are only used).
-	const actualNormalized = stringify( actual ).replace( /\u00A0/g, ' ' );
+	const actualNormalized = stringifyView( actual ).replace( /\u00A0/g, ' ' );
 
 	expect( actualNormalized ).to.equal( normalizeHtml( expectedInlined ) );
 }
 
 /**
- * Compares two models string representations. This function hooks into {@link module:engine/model/model~Model#insertContent}
- * to get the model representarion before it is inserted.
+ * Mocks dataTransfer object which can be used for simulating paste.
  *
- * @param {module:core/editor/editor~Editor} editor
- * @param {String} input
- * @param {String} expected
+ * @param {Object} data Object containing 'mime type - data' pairs.
+ * @returns {Object} DataTransfer mock object.
  */
-export function expectModel( editor, input, expected ) {
-	const editorModel = editor.model;
-	const insertContent = editorModel.insertContent;
-
-	let actual = '';
-
-	sinon.stub( editorModel, 'insertContent' ).callsFake( ( content, selection ) => {
-		// Save model string representation now as it may change after `insertContent()` function call
-		// so accessing it later may not work as it may have empty/changed structure.
-		actual = stringifyModel( content );
-		insertContent.call( editorModel, content, selection );
-	} );
-
-	pasteHtml( editor, input );
-
-	sinon.restore();
-
-	expect( actual.replace( /\u00A0/g, '#' ).replace( /&nbsp;/g, '#' ) )
-		.to.equal( expected.replace( /\u00A0/g, '#' ).replace( /&nbsp;/g, '#' ) );
+export function createDataTransfer( data ) {
+	return {
+		getData( type ) {
+			return data[ type ];
+		}
+	};
 }
 
 /**
@@ -136,6 +105,17 @@ export function getBrowserName() {
 	return browser.length ? browser[ 0 ] : null;
 }
 
+// Fires paste event on a given editor instance with a specific HTML data.
+//
+// @param {module:core/editor/editor~Editor} editor Editor instance on which paste event will be fired.
+// @param {String} html The HTML data with which paste event will be fired.
+function pasteHtml( editor, html ) {
+	editor.editing.view.document.fire( 'paste', {
+		dataTransfer: createDataTransfer( { 'text/html': html } ),
+		preventDefault() {}
+	} );
+}
+
 // Checks if current browser is one of the predefined ones (Chrome, Edge, Firefox, IE, Safari).
 //
 // @param {Navigator} navigator Browser `window.navigator` object on which detection is based.

+ 14 - 42
packages/ckeditor5-paste-from-office/tests/data/integration/list.js

@@ -16,22 +16,16 @@ import Link from '@ckeditor/ckeditor5-link/src/link';
 import List from '@ckeditor/ckeditor5-list/src/list';
 import PasteFromOffice from '../../../src/pastefromoffice';
 
-import { setData, stringify } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
-import { pasteHtml } from '../../_utils/utils';
-
-import simple from '../../_data/list/simple/input.word2016.html';
-import styled from '../../_data/list/styled/input.word2016.html';
-import multiple from '../../_data/list/multiple/input.word2016.html';
-import multipleCombined from '../../_data/list/multiple-combined/input.word2016.html';
-import manyOneItem from '../../_data/list/many-one-item/input.word2016.html';
-import heading1 from '../../_data/list/heading1/input.word2016.html';
-import heading3Styled from '../../_data/list/heading3-styled/input.word2016.html';
-import heading7 from '../../_data/list/heading7/input.word2016.html';
+import { setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
+import { getFixtures } from '../../_utils/fixtures';
+import { expectModel } from '../../_utils/utils';
 
 describe( 'List – integration', () => {
-	let element, editor, insertedModel;
+	let element, editor, input;
 
 	before( () => {
+		input = getFixtures( 'list' ).input;
+
 		element = document.createElement( 'div' );
 
 		document.body.appendChild( element );
@@ -40,16 +34,6 @@ describe( 'List – integration', () => {
 			.create( element, { plugins: [ Clipboard, Paragraph, Heading, Bold, Italic, Underline, Link, List, PasteFromOffice ] } )
 			.then( editorInstance => {
 				editor = editorInstance;
-
-				const model = editor.model;
-				const insertContent = model.insertContent;
-
-				sinon.stub( editor.model, 'insertContent' ).callsFake( ( content, selection ) => {
-					// Save model string representation now as it may change after `insertContent()` function call
-					// so accessing it later may not work as it may have empty/changed structure.
-					insertedModel = stringify( content );
-					insertContent.call( model, content, selection );
-				} );
 			} );
 	} );
 
@@ -57,13 +41,7 @@ describe( 'List – integration', () => {
 		setData( editor.model, '<paragraph>[]</paragraph>' );
 	} );
 
-	afterEach( () => {
-		insertedModel = null;
-	} );
-
 	after( () => {
-		sinon.restore();
-
 		editor.destroy();
 
 		element.remove();
@@ -81,7 +59,7 @@ describe( 'List – integration', () => {
 		const expectedModel = '<listItem listIndent="0" listType="numbered">Item1</listItem>' +
 			'<listItem listIndent="0" listType="numbered">Item 2</listItem>';
 
-		expectContent( simple, expectedModel );
+		expectModel( editor, input.simple, expectedModel );
 	} );
 
 	// Pastes (after cleaning up garbage markup):
@@ -107,7 +85,7 @@ describe( 'List – integration', () => {
 			'<$text bold="true" italic="true" underline="true">tip</$text>' +
 			'<$text italic="true" underline="true">le</$text></listItem>';
 
-		expectContent( styled, expectedModel );
+		expectModel( editor, input.styled, expectedModel );
 	} );
 
 	// Pastes (after cleaning up garbage markup):
@@ -133,7 +111,7 @@ describe( 'List – integration', () => {
 			'<paragraph>Some text</paragraph>' +
 			'<listItem listIndent="0" listType="bulleted">Bullet 1</listItem>';
 
-		expectContent( multiple, expectedModel );
+		expectModel( editor, input.multiple, expectedModel );
 	} );
 
 	// Pastes (after cleaning up garbage markup):
@@ -161,7 +139,7 @@ describe( 'List – integration', () => {
 			'<listItem listIndent="0" listType="numbered">Item 1</listItem>' +
 			'<listItem listIndent="0" listType="numbered">Item2</listItem>';
 
-		expectContent( multipleCombined, expectedModel );
+		expectModel( editor, input.multipleCombined, expectedModel );
 	} );
 
 	// Pastes (after cleaning up garbage markup):
@@ -218,7 +196,7 @@ describe( 'List – integration', () => {
 			'<paragraph></paragraph>' +
 			'<listItem listIndent="0" listType="numbered">h1</listItem>';
 
-		expectContent( manyOneItem, expectedModel );
+		expectModel( editor, input.manyOneItem, expectedModel );
 	} );
 
 	// Pastes (after cleaning up garbage markup):
@@ -238,7 +216,7 @@ describe( 'List – integration', () => {
 		const expectedModel = '<listItem listIndent="0" listType="numbered">H1 1</listItem>' +
 			'<listItem listIndent="0" listType="numbered">H1 2</listItem>';
 
-		expectContent( heading1, expectedModel );
+		expectModel( editor, input.heading1, expectedModel );
 	} );
 
 	// Pastes (after cleaning up garbage markup):
@@ -259,7 +237,7 @@ describe( 'List – integration', () => {
 			'<listItem listIndent="0" listType="bulleted"><$text italic="true" underline="true">H</$text>' +
 			'<$text underline="true">2</$text> 2</listItem>';
 
-		expectContent( heading3Styled, expectedModel );
+		expectModel( editor, input.heading3Styled, expectedModel );
 	} );
 
 	// Pastes (after cleaning up garbage markup):
@@ -276,12 +254,6 @@ describe( 'List – integration', () => {
 	it( 'pastes list created from styled headings (h3)', () => {
 		const expectedModel = '<listItem listIndent="0" listType="numbered">H 7</listItem>';
 
-		expectContent( heading7, expectedModel );
+		expectModel( editor, input.heading7, expectedModel );
 	} );
-
-	function expectContent( input, expectedModel ) {
-		pasteHtml( editor, input );
-
-		expect( insertedModel ).to.equal( expectedModel );
-	}
 } );

+ 14 - 27
packages/ckeditor5-paste-from-office/tests/data/normalization/list.js

@@ -8,27 +8,14 @@ import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
 import PasteFromOffice from '../../../src/pastefromoffice';
 
 import { expectNormalized } from '../../_utils/utils';
-
-import simple from '../../_data/list/simple/input.word2016.html';
-import styled from '../../_data/list/styled/input.word2016.html';
-import multiple from '../../_data/list/multiple/input.word2016.html';
-import multipleCombined from '../../_data/list/multiple-combined/input.word2016.html';
-import manyOneItem from '../../_data/list/many-one-item/input.word2016.html';
-import heading1 from '../../_data/list/heading1/input.word2016.html';
-import heading3Styled from '../../_data/list/heading3-styled/input.word2016.html';
-import heading7 from '../../_data/list/heading7/input.word2016.html';
-
-import simpleNormalized from '../../_data/list/simple/normalized.word2016.html';
-import styledNormalized from '../../_data/list/styled/normalized.word2016.html';
-import multipleNormalized from '../../_data/list/multiple/normalized.word2016.html';
-import multipleCombinedNormalized from '../../_data/list/multiple-combined/normalized.word2016.html';
-import manyOneItemNormalized from '../../_data/list/many-one-item/normalized.word2016.html';
-import heading1Normalized from '../../_data/list/heading1/normalized.word2016.html';
-import heading3StyledNormalized from '../../_data/list/heading3-styled/normalized.word2016.html';
-import heading7Normalized from '../../_data/list/heading7/normalized.word2016.html';
+import { getFixtures } from '../../_utils/fixtures';
 
 describe( 'List – normalization', () => {
-	let editor, pasteFromOfficePlugin;
+	let editor, input, normalized, pasteFromOfficePlugin;
+
+	before( () => {
+		( { input, normalized } = getFixtures( 'list' ) );
+	} );
 
 	beforeEach( () => {
 		return VirtualTestEditor
@@ -43,34 +30,34 @@ describe( 'List – normalization', () => {
 	} );
 
 	it( 'normalizes simple list', () => {
-		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( simple, editor ), simpleNormalized );
+		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( input.simple, editor ), normalized.simple );
 	} );
 
 	it( 'normalizes list with styled items prepended by a paragraph', () => {
-		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( styled, editor ), styledNormalized );
+		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( input.styled, editor ), normalized.styled );
 	} );
 
 	it( 'normalizes multiple lists separated by the paragraph', () => {
-		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( multiple, editor ), multipleNormalized );
+		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( input.multiple, editor ), normalized.multiple );
 	} );
 
 	it( 'normalizes multiple lists one right after another', () => {
-		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( multipleCombined, editor ), multipleCombinedNormalized );
+		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( input.multipleCombined, editor ), normalized.multipleCombined );
 	} );
 
 	it( 'normalizes many one item lists', () => {
-		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( manyOneItem, editor ), manyOneItemNormalized );
+		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( input.manyOneItem, editor ), normalized.manyOneItem );
 	} );
 
 	it( 'normalizes list created from headings (h1)', () => {
-		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( heading1, editor ), heading1Normalized );
+		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( input.heading1, editor ), normalized.heading1 );
 	} );
 
 	it( 'normalizes list created from styled headings (h3)', () => {
-		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( heading3Styled, editor ), heading3StyledNormalized );
+		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( input.heading3Styled, editor ), normalized.heading3Styled );
 	} );
 
 	it( 'normalizes list created from heading (h7)', () => {
-		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( heading7, editor ), heading7Normalized );
+		expectNormalized( pasteFromOfficePlugin._normalizeWordInput( input.heading7, editor ), normalized.heading7 );
 	} );
 } );