1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763
|
// For documentation of the format, see README in this directory.
var browserTests = [
["foo[]bar",
[["underline",""]],
"foo[]bar",
[true],
{"underline":[false,false,"",false,true,""]}],
["<p>[foo</p> <p>bar]</p>",
[["stylewithcss","true"],["underline",""]],
"<p><span style=\"text-decoration:underline\">[foo</span></p> <p><span style=\"text-decoration:underline\">bar]</span></p>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<p>[foo</p> <p>bar]</p>",
[["stylewithcss","false"],["underline",""]],
"<p><u>[foo</u></p> <p><u>bar]</u></p>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<span>[foo</span> <span>bar]</span>",
[["stylewithcss","true"],["underline",""]],
"<span style=\"text-decoration:underline\"><span>[foo</span> <span>bar]</span></span>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<span>[foo</span> <span>bar]</span>",
[["stylewithcss","false"],["underline",""]],
"<u><span>[foo</span> <span>bar]</span></u>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
[["stylewithcss","true"],["underline",""]],
"<p><span style=\"text-decoration:underline\">[foo</span></p><p> <span style=\"text-decoration:underline\">bar</span> </p><p><span style=\"text-decoration:underline\">baz</span></p>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
[["stylewithcss","false"],["underline",""]],
"<p><u>[foo</u></p><p> <u><span>bar</span></u> </p><p><u>baz]</u></p>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<p>[foo<p><br><p>bar]",
[["stylewithcss","true"],["underline",""]],
"<p><span style=\"text-decoration:underline\">[foo</span></p><p><span style=\"text-decoration:underline\"><br></span></p><p><span style=\"text-decoration:underline\">bar]</span></p>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<p>[foo<p><br><p>bar]",
[["stylewithcss","false"],["underline",""]],
"<p><u>[foo</u></p><p><u><br></u></p><p><u>bar]</u></p>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<b>foo[]bar</b>",
[["underline",""]],
"<b>foo[]bar</b>",
[true],
{"underline":[false,false,"",false,true,""]}],
["<i>foo[]bar</i>",
[["underline",""]],
"<i>foo[]bar</i>",
[true],
{"underline":[false,false,"",false,true,""]}],
["<span>foo</span>{}<span>bar</span>",
[["underline",""]],
"<span>foo</span>{}<span>bar</span>",
[true],
{"underline":[false,false,"",false,true,""]}],
["<span>foo[</span><span>]bar</span>",
[["underline",""]],
"<span>foo[</span><span>]bar</span>",
[true],
{"underline":[false,false,"",false,true,""]}],
["foo[bar]baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline\">[bar]</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo[bar]baz",
[["stylewithcss","false"],["underline",""]],
"foo<u>[bar]</u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo[bar<b>baz]qoz</b>quz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline\">[bar</span><b><span style=\"text-decoration:underline\">baz]</span>qoz</b>quz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo[bar<b>baz]qoz</b>quz",
[["stylewithcss","false"],["underline",""]],
"foo<u>[bar</u><b><u>baz]</u>qoz</b>quz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo[bar<i>baz]qoz</i>quz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline\">[bar</span><i><span style=\"text-decoration:underline\">baz]</span>qoz</i>quz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo[bar<i>baz]qoz</i>quz",
[["stylewithcss","false"],["underline",""]],
"foo<u>[bar</u><i><u>baz]</u>qoz</i>quz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["{<p><p> <p>foo</p>}",
[["stylewithcss","true"],["underline",""]],
"{<p></p><p> </p><p><span style=\"text-decoration:underline\">foo</span></p>}",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["{<p><p> <p>foo</p>}",
[["stylewithcss","false"],["underline",""]],
"{<p></p><p> </p><p><u>foo</u></p>}",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
[["stylewithcss","true"],["underline",""]],
"<table><tbody><tr><td>foo</td><td>b<span style=\"text-decoration:underline\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
[["stylewithcss","false"],["underline",""]],
"<table><tbody><tr><td>foo</td><td>b<u>[a]</u>r</td><td>baz</td></tr></tbody></table>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
[["stylewithcss","true"],["underline",""]],
"<table><tbody><tr><td>foo</td>{<td><span style=\"text-decoration:underline\">bar</span></td>}<td>baz</td></tr></tbody></table>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
[["stylewithcss","false"],["underline",""]],
"<table><tbody><tr><td>foo</td>{<td><u>bar</u></td>}<td>baz</td></tr></tbody></table>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
[["stylewithcss","true"],["underline",""]],
"<table><tbody><tr>{<td><span style=\"text-decoration:underline\">foo</span></td><td><span style=\"text-decoration:underline\">bar</span></td>}<td>baz</td></tr></tbody></table>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
[["stylewithcss","false"],["underline",""]],
"<table><tbody><tr>{<td><u>foo</u></td><td><u>bar</u></td>}<td>baz</td></tr></tbody></table>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
[["stylewithcss","true"],["underline",""]],
"<table><tbody>{<tr><td><span style=\"text-decoration:underline\">foo</span></td><td><span style=\"text-decoration:underline\">bar</span></td><td><span style=\"text-decoration:underline\">baz</span></td></tr>}</tbody></table>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
[["stylewithcss","false"],["underline",""]],
"<table><tbody>{<tr><td><u>foo</u></td><td><u>bar</u></td><td><u>baz</u></td></tr>}</tbody></table>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
[["stylewithcss","true"],["underline",""]],
"<table>{<tbody><tr><td><span style=\"text-decoration:underline\">foo</span></td><td><span style=\"text-decoration:underline\">bar</span></td><td><span style=\"text-decoration:underline\">baz</span></td></tr></tbody>}</table>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
[["stylewithcss","false"],["underline",""]],
"<table>{<tbody><tr><td><u>foo</u></td><td><u>bar</u></td><td><u>baz</u></td></tr></tbody>}</table>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["{<table><tr><td>foo<td>bar<td>baz</table>}",
[["stylewithcss","true"],["underline",""]],
"{<table><tbody><tr><td><span style=\"text-decoration:underline\">foo</span></td><td><span style=\"text-decoration:underline\">bar</span></td><td><span style=\"text-decoration:underline\">baz</span></td></tr></tbody></table>}",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["{<table><tr><td>foo<td>bar<td>baz</table>}",
[["stylewithcss","false"],["underline",""]],
"{<table><tbody><tr><td><u>foo</u></td><td><u>bar</u></td><td><u>baz</u></td></tr></tbody></table>}",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<span style=\"text-decoration: underline\">[bar]</span>baz",
[["stylewithcss","true"],["underline",""]],
"foo[bar]baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo<span style=\"text-decoration: underline\">[bar]</span>baz",
[["stylewithcss","false"],["underline",""]],
"foo[bar]baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[bar]baz</u>",
[["stylewithcss","true"],["underline",""]],
"<span style=\"text-decoration:underline\">foo</span>[bar]<span style=\"text-decoration:underline\">baz</span>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[bar]baz</u>",
[["stylewithcss","false"],["underline",""]],
"<u>foo</u>[bar]<u>baz</u>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[b<span style=\"color:blue\">ar]ba</span>z</u>",
[["stylewithcss","true"],["underline",""]],
"<span style=\"text-decoration:underline\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\">ar]<span style=\"text-decoration:underline\">ba</span></span><span style=\"text-decoration:underline\">z</span>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[b<span style=\"color:blue\">ar]ba</span>z</u>",
[["stylewithcss","false"],["underline",""]],
"<u>foo</u>[b<span style=\"color:rgb(0, 0, 255)\">ar]<u>ba</u></span><u>z</u>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</u>",
[["stylewithcss","true"],["underline",""]],
"<span style=\"text-decoration:underline\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<span style=\"text-decoration:underline\">ba</span></span><span style=\"text-decoration:underline\">z</span>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</u>",
[["stylewithcss","false"],["underline",""]],
"<u>foo</u>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<u>ba</u></span><u>z</u>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[b<span style=\"font-size:3em\">ar]ba</span>z</u>",
[["stylewithcss","true"],["underline",""]],
"<span style=\"text-decoration:underline\">foo</span>[b<span style=\"font-size:3em\">ar]<span style=\"text-decoration:underline\">ba</span></span><span style=\"text-decoration:underline\">z</span>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[b<span style=\"font-size:3em\">ar]ba</span>z</u>",
[["stylewithcss","false"],["underline",""]],
"<u>foo</u>[b<span style=\"font-size:3em\">ar]<u>ba</u></span><u>z</u>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[b<i>ar]ba</i>z</u>",
[["stylewithcss","true"],["underline",""]],
"<span style=\"text-decoration:underline\">foo</span>[b<i>ar]<span style=\"text-decoration:underline\">ba</span></i><span style=\"text-decoration:underline\">z</span>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["<u>foo[b<i>ar]ba</i>z</u>",
[["stylewithcss","false"],["underline",""]],
"<u>foo</u>[b<i>ar]<u>ba</u></i><u>z</u>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["<p style=\"text-decoration: underline\">foo[bar]baz</p>",
[["stylewithcss","true"],["underline",""]],
"<p><span style=\"text-decoration:underline\">foo</span>[bar]<span style=\"text-decoration:underline\">baz</span></p>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["<p style=\"text-decoration: underline\">foo[bar]baz</p>",
[["stylewithcss","false"],["underline",""]],
"<p><u>foo</u>[bar]<u>baz</u></p>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
// <s> should be replaced with new <span> because it just represents line-though
// style, and should set its text-decoration to underline (requested style) and
// line-through (default style of <s>).
["foo<s>[bar]</s>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline line-through\">[bar]</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<s>[bar]</s>baz",
[["stylewithcss","false"],["underline",""]],
"foo<s><u>[bar]</u></s>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
// Should update text-decoration declaration in the <span> which is a container
// of the range.
["foo<span style=\"text-decoration: line-through\">[bar]</span>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline line-through\">[bar]</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<span style=\"text-decoration: line-through\">[bar]</span>baz",
[["stylewithcss","false"],["underline",""]],
"foo<u><span style=\"text-decoration:line-through\">[bar]</span></u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[bar]baz</s>",
[["stylewithcss","true"],["underline",""]],
"<s>foo<span style=\"text-decoration:underline\">[bar]</span>baz</s>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[bar]baz</s>",
[["stylewithcss","false"],["underline",""]],
"<s>foo<u>[bar]</u>baz</s>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[b<span style=\"color:blue\">ar]ba</span>z</s>",
[["stylewithcss","true"],["underline",""]],
"<s>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</s>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[b<span style=\"color:blue\">ar]ba</span>z</s>",
[["stylewithcss","false"],["underline",""]],
"<s>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\"><u>ar]</u>ba</span>z</s>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</s>",
[["stylewithcss","true"],["underline",""]],
"<s>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</s>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</s>",
[["stylewithcss","false"],["underline",""]],
"<s>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><u>ar]</u>ba</span>z</s>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[b<span style=\"font-size:3em\">ar]ba</span>z</s>",
[["stylewithcss","true"],["underline",""]],
"<s>foo<span style=\"text-decoration:underline\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</s>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[b<span style=\"font-size:3em\">ar]ba</span>z</s>",
[["stylewithcss","false"],["underline",""]],
"<s>foo<u>[b</u><span style=\"font-size:3em\"><u>ar]</u>ba</span>z</s>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[b<i>ar]ba</i>z</s>",
[["stylewithcss","true"],["underline",""]],
"<s>foo<span style=\"text-decoration:underline\">[b</span><i><span style=\"text-decoration:underline\">ar]</span>ba</i>z</s>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<s>foo[b<i>ar]ba</i>z</s>",
[["stylewithcss","false"],["underline",""]],
"<s>foo<u>[b</u><i><u>ar]</u>ba</i>z</s>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
[["stylewithcss","true"],["underline",""]],
"<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">[bar]</span>baz</p>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
[["stylewithcss","false"],["underline",""]],
"<p style=\"text-decoration:line-through\">foo<u>[bar]</u>baz</p>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
// Should replace <strike> with new <span> because <strike> is just representing
// line-through style, and set its text-decoration to underline (requested
// style) and line-though (default style of <strike>).
["foo<strike>[bar]</strike>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline line-through\">[bar]</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<strike>[bar]</strike>baz",
[["stylewithcss","false"],["underline",""]],
"foo<strike><u>[bar]</u></strike>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[bar]baz</strike>",
[["stylewithcss","true"],["underline",""]],
"<strike>foo<span style=\"text-decoration:underline\">[bar]</span>baz</strike>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[bar]baz</strike>",
[["stylewithcss","false"],["underline",""]],
"<strike>foo<u>[bar]</u>baz</strike>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[b<span style=\"color:blue\">ar]ba</span>z</strike>",
[["stylewithcss","true"],["underline",""]],
"<strike>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</strike>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[b<span style=\"color:blue\">ar]ba</span>z</strike>",
[["stylewithcss","false"],["underline",""]],
"<strike>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\"><u>ar]</u>ba</span>z</strike>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</strike>",
[["stylewithcss","true"],["underline",""]],
"<strike>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</strike>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</strike>",
[["stylewithcss","false"],["underline",""]],
"<strike>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><u>ar]</u>ba</span>z</strike>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[b<span style=\"font-size:3em\">ar]ba</span>z</strike>",
[["stylewithcss","true"],["underline",""]],
"<strike>foo<span style=\"text-decoration:underline\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</strike>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[b<span style=\"font-size:3em\">ar]ba</span>z</strike>",
[["stylewithcss","false"],["underline",""]],
"<strike>foo<u>[b</u><span style=\"font-size:3em\"><u>ar]</u>ba</span>z</strike>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[b<i>ar]ba</i>z</strike>",
[["stylewithcss","true"],["underline",""]],
"<strike>foo<span style=\"text-decoration:underline\">[b</span><i><span style=\"text-decoration:underline\">ar]</span>ba</i>z</strike>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<strike>foo[b<i>ar]ba</i>z</strike>",
[["stylewithcss","false"],["underline",""]],
"<strike>foo<u>[b</u><i><u>ar]</u>ba</i>z</strike>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<ins>[bar]</ins>baz",
[["underline",""]],
"foo<ins>[bar]</ins>baz",
[true],
{"underline":[false,true,"",false,true,""]}],
["<ins>foo[bar]baz</ins>",
[["underline",""]],
"<ins>foo[bar]baz</ins>",
[true],
{"underline":[false,true,"",false,true,""]}],
["<ins>foo[b<span style=\"color:blue\">ar]ba</span>z</ins>",
[["underline",""]],
"<ins>foo[b<span style=\"color:rgb(0, 0, 255)\">ar]ba</span>z</ins>",
[true],
{"underline":[false,true,"",false,true,""]}],
["<ins>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</ins>",
[["underline",""]],
"<ins>foo[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]ba</span>z</ins>",
[true],
{"underline":[false,true,"",false,true,""]}],
["<ins>foo[b<span style=\"font-size:3em\">ar]ba</span>z</ins>",
[["underline",""]],
"<ins>foo[b<span style=\"font-size:3em\">ar]ba</span>z</ins>",
[true],
{"underline":[false,true,"",false,true,""]}],
["<ins>foo[b<i>ar]ba</i>z</ins>",
[["underline",""]],
"<ins>foo[b<i>ar]ba</i>z</ins>",
[true],
{"underline":[false,true,"",false,true,""]}],
// Should set text-decoration of <del> because it has line-through style by
// default and it is not only representing it, thus, replacing it with <span>
// changes the meaning.
["foo<del>[bar]</del>baz",
[["stylewithcss","true"],["underline",""]],
"foo<del style=\"text-decoration:underline line-through\">[bar]</del>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<del>[bar]</del>baz",
[["stylewithcss","false"],["underline",""]],
"foo<del><u>[bar]</u></del>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[bar]baz</del>",
[["stylewithcss","true"],["underline",""]],
"<del>foo<span style=\"text-decoration:underline\">[bar]</span>baz</del>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[bar]baz</del>",
[["stylewithcss","false"],["underline",""]],
"<del>foo<u>[bar]</u>baz</del>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[b<span style=\"color:blue\">ar]ba</span>z</del>",
[["stylewithcss","true"],["underline",""]],
"<del>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</del>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[b<span style=\"color:blue\">ar]ba</span>z</del>",
[["stylewithcss","false"],["underline",""]],
"<del>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\"><u>ar]</u>ba</span>z</del>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</del>",
[["stylewithcss","true"],["underline",""]],
"<del>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</del>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</del>",
[["stylewithcss","false"],["underline",""]],
"<del>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><u>ar]</u>ba</span>z</del>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[b<span style=\"font-size:3em\">ar]ba</span>z</del>",
[["stylewithcss","true"],["underline",""]],
"<del>foo<span style=\"text-decoration:underline\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</del>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[b<span style=\"font-size:3em\">ar]ba</span>z</del>",
[["stylewithcss","false"],["underline",""]],
"<del>foo<u>[b</u><span style=\"font-size:3em\"><u>ar]</u>ba</span>z</del>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[b<i>ar]ba</i>z</del>",
[["stylewithcss","true"],["underline",""]],
"<del>foo<span style=\"text-decoration:underline\">[b</span><i><span style=\"text-decoration:underline\">ar]</span>ba</i>z</del>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<del>foo[b<i>ar]ba</i>z</del>",
[["stylewithcss","false"],["underline",""]],
"<del>foo<u>[b</u><i><u>ar]</u>ba</i>z</del>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<span style=\"text-decoration: underline line-through\">[bar]</span>baz",
[["underline",""]],
"foo<span style=\"text-decoration:line-through\">[bar]</span>baz",
[true],
{"underline":[false,true,"",false,false,""]}],
["foo<span style=\"text-decoration: underline line-through\">b[a]r</span>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:line-through\"><span style=\"text-decoration:underline\">b</span>[a]<span style=\"text-decoration:underline\">r</span></span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo<span style=\"text-decoration: underline line-through\">b[a]r</span>baz",
[["stylewithcss","false"],["underline",""]],
"foo<span style=\"text-decoration:line-through\"><u>b</u>[a]<u>r</u></span>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["foo<s style=\"text-decoration: underline\">[bar]</s>baz",
[["stylewithcss","true"],["underline",""]],
"foo[bar]baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo<s style=\"text-decoration: underline\">[bar]</s>baz",
[["stylewithcss","false"],["underline",""]],
"foo[bar]baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["foo<s style=\"text-decoration: underline\">b[a]r</s>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline\">b</span>[a]<span style=\"text-decoration:underline\">r</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo<s style=\"text-decoration: underline\">b[a]r</s>baz",
[["stylewithcss","false"],["underline",""]],
"foo<u>b</u>[a]<u>r</u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["foo<u style=\"text-decoration: line-through\">[bar]</u>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">[bar]</u></span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<u style=\"text-decoration: line-through\">[bar]</u>baz",
[["stylewithcss","false"],["underline",""]],
"foo<u><u style=\"text-decoration:line-through\">[bar]</u></u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<u style=\"text-decoration: line-through\">b[a]r</u>baz",
[["stylewithcss","true"],["underline",""]],
"foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">[a]</span>r</u>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<u style=\"text-decoration: line-through\">b[a]r</u>baz",
[["stylewithcss","false"],["underline",""]],
"foo<u style=\"text-decoration:line-through\">b<u>[a]</u>r</u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
// Should replace <s> with new <span> and set its `text-decoration` to underline
// (for applying the requested style) and overline (which was specified to the
// <s>). Note that line-though was removed by the text-decoration setting.
// Therefore, it should not appear.
["foo<s style=\"text-decoration: overline\">[bar]</s>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline overline\">[bar]</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<s style=\"text-decoration: overline\">[bar]</s>baz",
[["stylewithcss","false"],["underline",""]],
"foo<u><s style=\"text-decoration:overline\">[bar]</s></u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<s style=\"text-decoration: overline\">b[a]r</s>baz",
[["stylewithcss","true"],["underline",""]],
"foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">[a]</span>r</s>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<s style=\"text-decoration: overline\">b[a]r</s>baz",
[["stylewithcss","false"],["underline",""]],
"foo<s style=\"text-decoration:overline\">b<u>[a]</u>r</s>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<u style=\"text-decoration: overline\">[bar]</u>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">[bar]</u></span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<u style=\"text-decoration: overline\">[bar]</u>baz",
[["stylewithcss","false"],["underline",""]],
"foo<u><u style=\"text-decoration:overline\">[bar]</u></u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<u style=\"text-decoration: overline\">b[a]r</u>baz",
[["stylewithcss","true"],["underline",""]],
"foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">[a]</span>r</u>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<u style=\"text-decoration: overline\">b[a]r</u>baz",
[["stylewithcss","false"],["underline",""]],
"foo<u style=\"text-decoration:overline\">b<u>[a]</u>r</u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["<p style=\"text-decoration: overline\">foo[bar]baz</p>",
[["stylewithcss","true"],["underline",""]],
"<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">[bar]</span>baz</p>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["<p style=\"text-decoration: overline\">foo[bar]baz</p>",
[["stylewithcss","false"],["underline",""]],
"<p style=\"text-decoration:overline\">foo<u>[bar]</u>baz</p>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<span class=\"underline\">[bar]</span>baz",
[["underline",""]],
"foo<span class=\"underline\">[bar]</span>baz",
[true],
{"underline":[false,true,"",false,true,""]}],
["foo<span class=\"underline\">b[a]r</span>baz",
[["underline",""]],
"foo<span class=\"underline\">b[a]r</span>baz",
[true],
{"underline":[false,true,"",false,true,""]}],
["foo<span class=\"line-through\">[bar]</span>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span class=\"line-through\" style=\"text-decoration:underline\">[bar]</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<span class=\"line-through\">[bar]</span>baz",
[["stylewithcss","false"],["underline",""]],
"foo<span class=\"line-through\"><u>[bar]</u></span>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<span class=\"line-through\">b[a]r</span>baz",
[["stylewithcss","true"],["underline",""]],
"foo<span class=\"line-through\">b<span style=\"text-decoration:underline\">[a]</span>r</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
["foo<span class=\"line-through\">b[a]r</span>baz",
[["stylewithcss","false"],["underline",""]],
"foo<span class=\"line-through\">b<u>[a]</u>r</span>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
["foo<span class=\"underline-and-line-through\">[bar]</span>baz",
[["underline",""]],
"foo<span class=\"underline-and-line-through\">[bar]</span>baz",
[true],
{"underline":[false,true,"",false,true,""]}],
["foo<span class=\"underline-and-line-through\">b[a]r</span>baz",
[["underline",""]],
"foo<span class=\"underline-and-line-through\">b[a]r</span>baz",
[true],
{"underline":[false,true,"",false,true,""]}],
["fo[o<u>b]ar</u>baz",
[["underline",""]],
"fo<u>[ob]ar</u>baz",
[true],
{"underline":[true,false,"",false,true,""]}],
["foo<u>ba[r</u>b]az",
[["underline",""]],
"foo<u>ba[rb]</u>az",
[true],
{"underline":[true,false,"",false,true,""]}],
["fo[o<u>bar</u>b]az",
[["stylewithcss","true"],["underline",""]],
"fo<span style=\"text-decoration:underline\">[obarb]</span>az",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[true,false,"",false,true,""]}],
["fo[o<u>bar</u>b]az",
[["stylewithcss","false"],["underline",""]],
"fo<u>[obarb]</u>az",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[true,false,"",false,true,""]}],
["foo[<u>b]ar</u>baz",
[["stylewithcss","true"],["underline",""]],
"foo[b]<span style=\"text-decoration:underline\">ar</span>baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo[<u>b]ar</u>baz",
[["stylewithcss","false"],["underline",""]],
"foo[b]<u>ar</u>baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["foo<u>ba[r</u>]baz",
[["stylewithcss","true"],["underline",""]],
"foo<span style=\"text-decoration:underline\">ba</span>[r]baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo<u>ba[r</u>]baz",
[["stylewithcss","false"],["underline",""]],
"foo<u>ba</u>[r]baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["foo[<u>bar</u>]baz",
[["stylewithcss","true"],["underline",""]],
"foo[bar]baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo[<u>bar</u>]baz",
[["stylewithcss","false"],["underline",""]],
"foo[bar]baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["foo<u>[bar]</u>baz",
[["stylewithcss","true"],["underline",""]],
"foo[bar]baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo<u>[bar]</u>baz",
[["stylewithcss","false"],["underline",""]],
"foo[bar]baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["foo{<u>bar</u>}baz",
[["stylewithcss","true"],["underline",""]],
"foo{bar}baz",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
["foo{<u>bar</u>}baz",
[["stylewithcss","false"],["underline",""]],
"foo{bar}baz",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
["fo[o<span style=text-decoration:underline>b]ar</span>baz",
[["underline",""]],
"fo<span style=\"text-decoration:underline\">[ob]ar</span>baz",
[true],
{"underline":[true,false,"",false,true,""]}],
["<ins>fo[o</ins><u>b]ar</u>",
[["stylewithcss","true"],["underline",""]],
"<ins>fo[o</ins>b]<span style=\"text-decoration:underline\">ar</span>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",true,false,""]}],
["<ins>fo[o</ins><u>b]ar</u>",
[["stylewithcss","false"],["underline",""]],
"<ins>fo[o</ins>b]<u>ar</u>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",true,false,""]}],
["<u>fo[o</u><ins>b]ar</ins>",
[["stylewithcss","true"],["underline",""]],
"<span style=\"text-decoration:underline\">fo</span>[o<ins>b]ar</ins>",
[true,true],
{"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",true,false,""]}],
["<u>fo[o</u><ins>b]ar</ins>",
[["stylewithcss","false"],["underline",""]],
"<u>fo</u>[o<ins>b]ar</ins>",
[true,true],
{"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",true,false,""]}],
// Tests to remove only underline from existing text-decoration
["abc<span style=\"text-decoration:line-through overline underline\">[def]</span>ghi",
[["stylewithcss","true"],["underline",""]],
["abc<span style=\"text-decoration:overline line-through\">[def]</span>ghi",
"abc<span style=\"text-decoration-line:overline line-through\">[def]</span>ghi"],
[true,true],
{}],
// blink, text-decoration-color and text-decoration-style values should be
// dropped. This rule is odd because executing "underline" command causes
// the data loss, but for now, the compatibility between browsers is more
// important. Once you want/need to change the behavior of a browser, you
// should file a spec issue first.
// And these tests allows the difference between text-decoration vs.
// text-decoration-line because these tests want to check the data loss.
["abc<span style=\"text-decoration:blink line-through overline\">[def]</span>ghi",
[["stylewithcss","true"],["underline",""]],
["abc<span style=\"text-decoration:underline overline line-through\">[def]</span>ghi",
"abc<span style=\"text-decoration-line:underline overline line-through\">[def]</span>ghi"],
[true,true],
{}],
["abc<span style=\"text-decoration:line-through blue dotted\">[def]</span>ghi",
[["stylewithcss","true"],["underline",""]],
["abc<span style=\"text-decoration:underline line-through\">[def]</span>ghi",
"abc<span style=\"text-decoration-line:underline line-through\">[def]</span>ghi"],
[true,true],
{}],
["abc<span style=\"text-decoration:blink line-through underline overline\">[def]</span>ghi",
[["stylewithcss","true"],["underline",""]],
["abc<span style=\"text-decoration:overline line-through\">[def]</span>ghi",
"abc<span style=\"text-decoration-line:overline line-through\">[def]</span>ghi"],
[true,true],
{}],
["abc<span style=\"text-decoration:underline line-through blue dotted\">[def]</span>ghi",
[["stylewithcss","true"],["underline",""]],
["abc<span style=\"text-decoration:line-through\">[def]</span>ghi",
"abc<span style=\"text-decoration-line:line-through\">[def]</span>ghi"],
[true,true],
{}],
]
|