Skip to content

Commit

Permalink
tests: update for new parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed May 22, 2016
1 parent 734dafb commit ae44acc
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/css-ext-import.result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta charset="UTF-8"> <title>App</title> <style>p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}</style> </head> <body> body </body> </html>
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta charset="UTF-8"> <title>App</title> <style>p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;};</style> </head> <body> body </body> </html>
2 changes: 1 addition & 1 deletion test/fixtures/css-import.result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>inline style</title> <style> p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;} p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;} p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;} @media screen and orientation:landscape{p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}}</style> </head> <body> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>inline style</title> <style> p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}; p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}; p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}; @media screen and orientation:landscape{p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}};</style> </head> <body> </body> </html>
2 changes: 1 addition & 1 deletion test/fixtures/css-import.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
<body>

</body>
</html>
</html>
8 changes: 8 additions & 0 deletions test/fixtures/fake-google-fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* cyrillic-ext */
@font-face {
font-family: 'PT Sans';
font-style: normal;
font-weight: 400;
src: local('PT Sans'), local('PTSans-Regular'), format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
4 changes: 4 additions & 0 deletions test/fixtures/import-from-google.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import url(fake-google-fonts.css);@import url(fake-google-fonts.css);html{
font-family:"PT Sans",courier;
font-size:14px;
}
1 change: 1 addition & 0 deletions test/fixtures/import-from-google.result.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<style> @font-face{ font-family:'PT Sans';font-style:normal;font-weight:400;src:local('PT Sans'), local('PTSans-Regular'), format('woff2');unicode-range:U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;};@font-face{ font-family:'PT Sans';font-style:normal;font-weight:400;src:local('PT Sans'), local('PTSans-Regular'), format('woff2');unicode-range:U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;};html{ font-family:"PT Sans",courier;font-size:14px;}</style>
2 changes: 2 additions & 0 deletions test/fixtures/import-from-google.src.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<link href="import-from-google.css" media="all" rel="stylesheet" type="text/css"/>

2 changes: 1 addition & 1 deletion test/fixtures/import.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ p {
p:before {
content: '<';
color: blue;
}
}
2 changes: 1 addition & 1 deletion test/fixtures/kitchen-sink.result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>full combo</title> <style>p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}</style> <style> p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}body{ font-family:sans-serif;}#icon{ height:48px;width:48px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") no-repeat;background-size:cover;}</style> </head> <body> <script>function doit(o){var r="remy",e=o.bar="sharp";return r+e.split("").reverse().join("")}console.log(doit(window));</script> <script>console.log("Hello world");</script> <img src="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=" title="White 1x1"> <div id="icon"></div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>full combo</title> <style>p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;}</style> <style> p{ font-size:10px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") repeat;}p:before{ content:'<';color:blue;};body{ font-family:sans-serif;}#icon{ height:48px;width:48px;background:url("data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=") no-repeat;background-size:cover;}</style> </head> <body> <script>function doit(o){var r="remy",e=o.bar="sharp";return r+e.split("").reverse().join("")}console.log(doit(window));</script> <script>console.log("Hello world");</script> <img src="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=" title="White 1x1"> <div id="icon"></div> </body> </html>

0 comments on commit ae44acc

Please sign in to comment.