@@ -505,7 +505,7 @@ public void mediaRulePrint() throws Exception {
505505
506506 Assert .assertEquals (1 , rules .getLength ());
507507 final AbstractCSSRuleImpl cssRule = rules .getRules ().get (0 );
508- Assert .assertEquals ("@media print {h1 { color: red } }" , cssRule .getCssText ());
508+ Assert .assertEquals ("@media print {\n h1 { color: red }\n }" , cssRule .getCssText ());
509509
510510 final MediaListImpl mediaList = ((CSSMediaRuleImpl ) cssRule ).getMediaList ();
511511
@@ -525,7 +525,7 @@ public void mediaRulePrintAndScreen() throws Exception {
525525
526526 Assert .assertEquals (1 , rules .getLength ());
527527 final AbstractCSSRuleImpl cssRule = rules .getRules ().get (0 );
528- Assert .assertEquals ("@media print, screen {h1 { color: red } }" , cssRule .getCssText ());
528+ Assert .assertEquals ("@media print, screen {\n h1 { color: red }\n }" , cssRule .getCssText ());
529529
530530 final MediaListImpl mediaList = ((CSSMediaRuleImpl ) cssRule ).getMediaList ();
531531
@@ -547,8 +547,8 @@ public void nestedMediaRule() throws Exception {
547547
548548 Assert .assertEquals (1 , rules .getLength ());
549549 AbstractCSSRuleImpl cssRule = rules .getRules ().get (0 );
550- Assert .assertEquals ("@media print {*#navigation { display: none } "
551- + "@media all and (max-width: 12cm) {*.note { float: none } } }" , cssRule .getCssText ());
550+ Assert .assertEquals ("@media print {\n *#navigation { display: none }"
551+ + "\n @media (max-width: 12cm) {\n *.note { float: none }\n } \n }" , cssRule .getCssText ());
552552
553553 MediaListImpl mediaList = ((CSSMediaRuleImpl ) cssRule ).getMediaList ();
554554 Assert .assertEquals (1 , mediaList .getLength ());
@@ -561,11 +561,11 @@ public void nestedMediaRule() throws Exception {
561561 Assert .assertEquals ("*#navigation { display: none }" , cssRule .getCssText ());
562562
563563 cssRule = innerRules .getRules ().get (1 );
564- Assert .assertEquals ("@media all and (max-width: 12cm) {*.note { float: none } }" , cssRule .getCssText ());
564+ Assert .assertEquals ("@media (max-width: 12cm) {\n *.note { float: none }\n }" , cssRule .getCssText ());
565565
566566 mediaList = ((CSSMediaRuleImpl ) cssRule ).getMediaList ();
567567 Assert .assertEquals (1 , mediaList .getLength ());
568- Assert .assertEquals ("all and (max-width: 12cm)" , mediaList .getMediaText ());
568+ Assert .assertEquals ("(max-width: 12cm)" , mediaList .getMediaText ());
569569 }
570570
571571 /**
@@ -810,7 +810,7 @@ public void atRules2() throws Exception {
810810 Assert .assertEquals ("@import url(\" subs.css\" );" , rule .getCssText ());
811811
812812 rule = rules .getRules ().get (1 );
813- Assert .assertEquals ("@media print {body { font-size: 10pt } }" , rule .getCssText ());
813+ Assert .assertEquals ("@media print {\n body { font-size: 10pt }\n }" , rule .getCssText ());
814814
815815 rule = rules .getRules ().get (2 );
816816 Assert .assertEquals ("h1 { color: blue }" , rule .getCssText ());
@@ -855,7 +855,7 @@ public void atRules2b() throws Exception {
855855 Assert .assertEquals ("@import url(\" subs.css\" );" , rule .getCssText ());
856856
857857 rule = rules .getRules ().get (1 );
858- Assert .assertEquals ("@media print {body { font-size: 10pt } }" , rule .getCssText ());
858+ Assert .assertEquals ("@media print {\n body { font-size: 10pt }\n }" , rule .getCssText ());
859859
860860 rule = rules .getRules ().get (2 );
861861 Assert .assertEquals ("h1 { color: blue }" , rule .getCssText ());
@@ -1834,7 +1834,7 @@ public void unexpectedEndOfStyleSheet() throws Exception {
18341834 Assert .assertEquals (1 , rules .getLength ());
18351835
18361836 final AbstractCSSRuleImpl rule = rules .getRules ().get (0 );
1837- Assert .assertEquals ("@media screen {p:before { content: Hello } }" , rule .getCssText ());
1837+ Assert .assertEquals ("@media screen {\n p:before { content: Hello }\n }" , rule .getCssText ());
18381838 }
18391839
18401840 /**
@@ -1870,7 +1870,7 @@ public void unexpectedEndOfMediaRule() throws Exception {
18701870 Assert .assertEquals (1 , rules .getLength ());
18711871
18721872 final AbstractCSSRuleImpl rule = rules .getRules ().get (0 );
1873- Assert .assertEquals ("@media screen {p:before { content: Hello } }" , rule .getCssText ());
1873+ Assert .assertEquals ("@media screen {\n p:before { content: Hello }\n }" , rule .getCssText ());
18741874 }
18751875
18761876 /**
@@ -3457,7 +3457,7 @@ public void unicode() throws Exception {
34573457 */
34583458 @ Test
34593459 public void unicodeEscaping () throws Exception {
3460- unicode ("@media paper\\ 7b { }" , "@media paper{ {}" );
3460+ unicode ("@media paper\\ 7b { }" , "@media paper{ {\n }" );
34613461 unicode (".class\\ 7b { color: blue }" , "*.class{ { color: blue }" );
34623462 unicode ("@page :pseu\\ 64o { color: blue }" , "@page :pseudo {color: blue}" );
34633463 unicode ("h1:first-l\\ 69ne { color: blue }" , "h1:first-line { color: blue }" );
@@ -3647,26 +3647,26 @@ public void realWorldMicrosoft() throws Exception {
36473647 @ Test
36483648 public void realWorldOracle () throws Exception {
36493649 realWorld ("realworld/compass-homestyle.css" , 735 , 2160 ,
3650- "all and (max-height: 600px);"
3651- + "all and (max-width: 600px);"
3652- + "all and (max-width: 770px);"
3653- + "all and (min-width: 0) and (max-width: 1012px);"
3654- + "all and (min-width: 0) and (max-width: 1018px);"
3655- + "all and (min-width: 0) and (max-width: 1111px);"
3656- + "all and (min-width: 0) and (max-width: 1312px);"
3657- + "all and (min-width: 0) and (max-width: 390px);"
3658- + "all and (min-width: 0) and (max-width: 400px);"
3659- + "all and (min-width: 0) and (max-width: 410px);"
3660- + "all and (min-width: 0) and (max-width: 450px);"
3661- + "all and (min-width: 0) and (max-width: 600px);"
3662- + "all and (min-width: 0) and (max-width: 640px);"
3663- + "all and (min-width: 0) and (max-width: 680px);"
3664- + "all and (min-width: 0) and (max-width: 720px);"
3665- + "all and (min-width: 0) and (max-width: 770px);"
3666- + "all and (min-width: 0) and (max-width: 870px);"
3667- + "all and (min-width: 0) and (max-width: 974px);"
3668- + "all and (min-width: 601px);"
3669- + "all and (min-width: 771px) and (max-width: 990px);"
3650+ "(max-height: 600px);"
3651+ + "(max-width: 600px);"
3652+ + "(max-width: 770px);"
3653+ + "(min-width: 0) and (max-width: 1012px);"
3654+ + "(min-width: 0) and (max-width: 1018px);"
3655+ + "(min-width: 0) and (max-width: 1111px);"
3656+ + "(min-width: 0) and (max-width: 1312px);"
3657+ + "(min-width: 0) and (max-width: 390px);"
3658+ + "(min-width: 0) and (max-width: 400px);"
3659+ + "(min-width: 0) and (max-width: 410px);"
3660+ + "(min-width: 0) and (max-width: 450px);"
3661+ + "(min-width: 0) and (max-width: 600px);"
3662+ + "(min-width: 0) and (max-width: 640px);"
3663+ + "(min-width: 0) and (max-width: 680px);"
3664+ + "(min-width: 0) and (max-width: 720px);"
3665+ + "(min-width: 0) and (max-width: 770px);"
3666+ + "(min-width: 0) and (max-width: 870px);"
3667+ + "(min-width: 0) and (max-width: 974px);"
3668+ + "(min-width: 601px);"
3669+ + "(min-width: 771px) and (max-width: 990px);"
36703670 + "only screen and (max-width: 974px);"
36713671 + "only screen and (min-width: 0) and (max-width: 1024px);"
36723672 + "only screen and (min-width: 0) and (max-width: 320px);"
@@ -3766,14 +3766,14 @@ public void realWorldBlueprint() throws Exception {
37663766 */
37673767 @ Test
37683768 public void realWorldBootstrap337 () throws Exception {
3769- final String media = "all and (-webkit-transform-3d);"
3770- + "all and (max-device-width: 480px) and (orientation: landscape);"
3771- + "all and (max-width: 767px);"
3772- + "all and (min-width: 1200px);"
3773- + "all and (min-width: 768px);"
3774- + "all and (min-width: 768px) and (max-width: 991px);all and (min-width: 992px);"
3775- + "all and (min-width: 992px) and (max-width: 1199px);"
3776- + "all and (transform-3d);print;"
3769+ final String media = "(-webkit-transform-3d);"
3770+ + "(max-device-width: 480px) and (orientation: landscape);"
3771+ + "(max-width: 767px);"
3772+ + "(min-width: 1200px);"
3773+ + "(min-width: 768px);"
3774+ + "(min-width: 768px) and (max-width: 991px);(min-width: 992px);"
3775+ + "(min-width: 992px) and (max-width: 1199px);"
3776+ + "(transform-3d);print;"
37773777 + "screen and (-webkit-min-device-pixel-ratio: 0);"
37783778 + "screen and (max-width: 767px);"
37793779 + "screen and (min-width: 768px);" ;
@@ -3785,14 +3785,14 @@ public void realWorldBootstrap337() throws Exception {
37853785 */
37863786 @ Test
37873787 public void realWorldBootstrap400 () throws Exception {
3788- final String media = "all and (max-width: 1199.98px);"
3789- + "all and (max-width: 575.98px);"
3790- + "all and (max-width: 767.98px);"
3791- + "all and (max-width: 991.98px);"
3792- + "all and (min-width: 1200px);"
3793- + "all and (min-width: 576px);"
3794- + "all and (min-width: 768px);"
3795- + "all and (min-width: 992px);"
3788+ final String media = "(max-width: 1199.98px);"
3789+ + "(max-width: 575.98px);"
3790+ + "(max-width: 767.98px);"
3791+ + "(max-width: 991.98px);"
3792+ + "(min-width: 1200px);"
3793+ + "(min-width: 576px);"
3794+ + "(min-width: 768px);"
3795+ + "(min-width: 992px);"
37963796 + "print;" ;
37973797 realWorld ("realworld/bootstrap_4_0_0.css" , 1033 , 2470 , media , 0 , 0 );
37983798 realWorld ("realworld/bootstrap_4_0_0_min.css" , 1033 , 2470 , media , 0 , 0 );
@@ -3825,18 +3825,18 @@ public void realStackoverflow() throws Exception {
38253825 */
38263826 @ Test
38273827 public void realMui () throws Exception {
3828- final String media = "all and (-ms-high-contrast: active);"
3829- + "all and (-ms-high-contrast: none);"
3830- + "all and (max-width: 543px);"
3831- + "all and (min-width: 1200px);"
3832- + "all and (min-width: 480px);"
3833- + "all and (min-width: 544px);"
3834- + "all and (min-width: 544px) and (max-width: 767px);"
3835- + "all and (min-width: 768px);"
3836- + "all and (min-width: 768px) and (max-width: 991px);"
3837- + "all and (min-width: 992px);"
3838- + "all and (min-width: 992px) and (max-width: 1199px);"
3839- + "all and (orientation: landscape) and (max-height: 480px);" ;
3828+ final String media = "(-ms-high-contrast: active);"
3829+ + "(-ms-high-contrast: none);"
3830+ + "(max-width: 543px);"
3831+ + "(min-width: 1200px);"
3832+ + "(min-width: 480px);"
3833+ + "(min-width: 544px);"
3834+ + "(min-width: 544px) and (max-width: 767px);"
3835+ + "(min-width: 768px);"
3836+ + "(min-width: 768px) and (max-width: 991px);"
3837+ + "(min-width: 992px);"
3838+ + "(min-width: 992px) and (max-width: 1199px);"
3839+ + "(orientation: landscape) and (max-height: 480px);" ;
38403840 realWorld ("realworld/mui.css" , 342 , 752 , media , 0 , 0 );
38413841 }
38423842
0 commit comments