Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

Suite of CSS tests (originating from the W3C) used to validate CSS parsing.

License

Notifications You must be signed in to change notification settings

dart-archive/csslib-test-suite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

W3C CSS Test Suite Repository

All tests originated from the CSS Working Group Test repository from the /approved directory. This directory contains all tests that have been reviewed and approved. Some tests have been modified to pass HTML5 parsing, or normalizing of CSS for suite testing; the essence of CSS has not been changed.

The suite of tests is normally used to validate CSS rendering in a browser. This library uses the tests to validate CSS parsing and CSS' representation in a AST to ensure valid CSS is accepted.

Build Status

Running All Tests

All enabled tests should be passing. Set current directory:

cd csslib-test-suite

To run all suite tests:

# Make sure dependencies are installed
pub install

# Run command line tests
#export DART_SDK=path/to/dart/sdk
dart run_all.dart

Running a set of tests

To run an particular set of tests

dart suite/selectors3/selectors3_test.dart

Tests Suite Infrastructure

All suite tests are run from the dart file test/suite/run_all.dart

Each CSS test is located in the src directory within the directory named for the set of tests to run. For example, the directory suite/css3-page will test the @page CSS directive. In the css3-page directory will be a src directory of the the raw files that contain HTML and/or CSS and a dart file that spins up the tests to run. In each dart file, is an _ExceptionMatches Map that maps test files to either be skipped (marked as SKIP_TEST) or matching text to validate the parsed CSS text (typically the normalizing of spaces, color values, etc.).

Disclaimer: Any test marked as SKIP_TEST has a TODO comment that will be fixed as we add more functionality (e.g., encoding, richer selector parsing and error recovery).

About

Suite of CSS tests (originating from the W3C) used to validate CSS parsing.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages