Skip to content

Commit 67733fb

Browse files
committed
more tests
1 parent c02a55b commit 67733fb

File tree

9 files changed

+57385
-0
lines changed

9 files changed

+57385
-0
lines changed

src/test/java/org/htmlunit/cssparser/parser/CSS3ParserRealWorldTest.java

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,104 @@ public void bootstrap_5_2_0() throws Exception {
290290
realWorld("realworld/bootstrap_5_2_0.min.css", 1198, 3033, media, 40, 0);
291291
}
292292

293+
/**
294+
* @throws Exception if any error occurs
295+
*/
296+
@Test
297+
public void foundation_6_9_0() throws Exception {
298+
String media = "(-ms-high-contrast: active);"
299+
+ "all and (-ms-high-contrast: none);"
300+
+ "print;"
301+
+ "screen and (max-width: 0em);"
302+
+ "screen and (max-width: 39.99875em);"
303+
+ "screen and (max-width: 63.99875em);"
304+
+ "screen and (max-width: 74.99875em);"
305+
+ "screen and (min-width: 0\\0 );"
306+
+ "screen and (min-width: 40em);"
307+
+ "screen and (min-width: 40em) and (max-width: 63.99875em);"
308+
+ "screen and (min-width: 64em);"
309+
+ "screen and (min-width: 64em) and (max-width: 74.99875em);"
310+
+ "screen and (min-width: 75em);"
311+
+ "screen and (orientation: landscape);"
312+
+ "screen and (orientation: portrait);"
313+
+ "screen and (prefers-color-scheme: dark);";
314+
realWorld("realworld/foundation_6_9_0.css", 1048, 2759, media, 0, 0);
315+
316+
media = media.replace("screen and (min-width: 0\\0 );", "screen and (min-width: 0\\0);");
317+
realWorld("realworld/foundation_6_9_0.min.css", 1048, 2759, media, 0, 0);
318+
}
319+
320+
/**
321+
* @throws Exception if any error occurs
322+
*/
323+
@Test
324+
public void materialize_1_0_0() throws Exception {
325+
final String media = "only screen and (max-width: 360px);"
326+
+ "only screen and (max-width: 600px);"
327+
+ "only screen and (max-width: 992px);"
328+
+ "only screen and (min-width: 0);"
329+
+ "only screen and (min-width: 1200px);"
330+
+ "only screen and (min-width: 1201px);"
331+
+ "only screen and (min-width: 360px);"
332+
+ "only screen and (min-width: 390px);"
333+
+ "only screen and (min-width: 420px);"
334+
+ "only screen and (min-width: 450px);"
335+
+ "only screen and (min-width: 480px);"
336+
+ "only screen and (min-width: 510px);"
337+
+ "only screen and (min-width: 540px);"
338+
+ "only screen and (min-width: 570px);"
339+
+ "only screen and (min-width: 600px);"
340+
+ "only screen and (min-width: 600px) and (max-width: 992px);"
341+
+ "only screen and (min-width: 601px);"
342+
+ "only screen and (min-width: 601px) and (max-width: 992px);"
343+
+ "only screen and (min-width: 630px);"
344+
+ "only screen and (min-width: 660px);"
345+
+ "only screen and (min-width: 690px);"
346+
+ "only screen and (min-width: 720px);"
347+
+ "only screen and (min-width: 750px);"
348+
+ "only screen and (min-width: 780px);"
349+
+ "only screen and (min-width: 810px);"
350+
+ "only screen and (min-width: 840px);"
351+
+ "only screen and (min-width: 870px);"
352+
+ "only screen and (min-width: 900px);"
353+
+ "only screen and (min-width: 930px);"
354+
+ "only screen and (min-width: 960px);"
355+
+ "only screen and (min-width: 992px);"
356+
+ "only screen and (min-width: 993px);";
357+
realWorld("realworld/materialize_1_0_0.css", 1368, 2986, media, 0, 0);
358+
realWorld("realworld/materialize_1_0_0.min.css", 1367, 2986, media, 0, 0);
359+
}
360+
361+
/**
362+
* @throws Exception if any error occurs
363+
*/
364+
@Test
365+
public void pure_3_0_0() throws Exception {
366+
final String media = "only screen and (max-width: 480px);";
367+
realWorld("realworld/pure_3_0_0.css", 165, 334, media, 0, 0);
368+
realWorld("realworld/pure_3_0_0.min.css", 165, 334, media, 0, 0);
369+
}
370+
371+
/**
372+
* @throws Exception if any error occurs
373+
*/
374+
@Test
375+
public void semantic_2_5_0() throws Exception {
376+
final String media = "all and (-ms-high-contrast: none);"
377+
+ "only screen and (max-width: 767px);"
378+
+ "only screen and (max-width: 991px);"
379+
+ "only screen and (min-width: 1200px);"
380+
+ "only screen and (min-width: 1200px) and (max-width: 1919px);"
381+
+ "only screen and (min-width: 1920px);"
382+
+ "only screen and (min-width: 320px) and (max-width: 767px);"
383+
+ "only screen and (min-width: 768px);"
384+
+ "only screen and (min-width: 768px) and (max-width: 991px);"
385+
+ "only screen and (min-width: 992px);"
386+
+ "only screen and (min-width: 992px) and (max-width: 1199px);";
387+
realWorld("realworld/semantic_2_5_0.css", 5486, 10068, media, 7, 4);
388+
realWorld("realworld/semantic_2_5_0.min.css", 5486, 10068, media, 7, 4);
389+
}
390+
293391
/**
294392
* @throws Exception if any error occurs
295393
*/

0 commit comments

Comments
 (0)