///|
/// Generated from WPT SVG reftests (static only)
/// Run: node scripts/generate-wpt-svg.mjs

///|
struct WptCase {
  name : String
  test_svg : String
  ref_svg : String
  width : Int
  height : Int
  max_diff : Int
  max_pixels : Int
}

///|
fn wpt_svg_cases() -> Array[WptCase] {
  [
    case(
      "embedded/image-embedding-svg-with-auto-height.svg",
      (
        #|
        #|  
        #|    <image> embedding SVG image with auto height
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      200,
      200,
      -1,
      -1,
    ),
    case(
      "embedded/image-embedding-svg-with-fractional-viewbox.svg",
      (
        #|
        #|  <image> embedding SVG image with fractional viewBox
        #|  
        #|  
        #|
        #|  
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "embedded/image-embedding-svg-with-viewport-units-inline-style.svg",
      (
        #|
        #|  
        #|    <image> embedding SVG image with viewport units
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "embedded/image-embedding-svg-with-viewport-units.svg",
      (
        #|
        #|  
        #|    <image> embedding SVG image with viewport units
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "embedded/image-fractional-width-vertical-fidelity.svg",
      (
        #|
        #|  Vertical fidelity of <image> element with fractional width
        #|  
        #|  
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/color-interpolation-001.svg",
      (
        #|
        #|  'color-interpolation: linearRGB' applies somewhat correctly
        #|  
        #|  
        #|
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/currentColor-override-pserver-fallback.svg",
      (
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/currentColor-override-pserver-fill.svg",
      (
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/currentColor-override-pserver-stroke.svg",
      (
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/marker-001.svg",
      (
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|      
        #|      
        #|        
        #|      
        #|      
        #|        
        #|      
        #|      
        #|        
        #|      
        #|      
        #|        
        #|      
        #|      
        #|        
        #|      
        #|    
        #|    
        #|    Basic Markers
        #|    
        #|    
        #|    Start, Middle and End
        #|    
        #|    
        #|    Automatic Orientation
        #|    
        #|
        #|
      ),
      (
        #|
        #|  Basic Markers
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|  Start, Middle and End
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|  Automatic Orientation
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|
      ),
      300,
      300,
      -1,
      -1,
    ),
    case(
      "painting/marker-002.svg",
      (
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|      Marker Rendering Properties
        #|      
        #|      
        #|        
        #|          
        #|        
        #|        Fill Property
        #|        
        #|      
        #|      
        #|      
        #|        
        #|          
        #|        
        #|        Stroke Property
        #|        
        #|      
        #|      
        #|      
        #|        
        #|          
        #|        
        #|        
        #|          
        #|        
        #|      
        #|      
        #|      
        #|        Mixed Properties
        #|        
        #|      
        #|      
        #|        Mixed Properties
        #|        
        #|      
        #|    
        #|
        #|
      ),
      (
        #|
        #|    
        #|      Marker Rendering Properties
        #|      
        #|      
        #|        
        #|          
        #|        
        #|        Fill Property
        #|        
        #|      
        #|      
        #|      
        #|        
        #|          
        #|        
        #|        Stroke Property
        #|        
        #|      
        #|      
        #|      
        #|        
        #|          
        #|        
        #|        
        #|          
        #|        
        #|      
        #|      
        #|      
        #|        Mixed Properties
        #|        
        #|      
        #|      
        #|        Mixed Properties
        #|        
        #|      
        #|    
        #|
        #|
      ),
      500,
      500,
      -1,
      -1,
    ),
    case(
      "painting/marker-004.svg",
      (
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|      
        #|        
        #|      
        #|    
        #|
        #|    'marker' attribute test
        #|    
        #|    
        #|      
        #|      
        #|      
        #|      
        #|      
        #|    
        #|
        #|
      ),
      (
        #|
        #|    'marker' attribute test
        #|    
        #|      
        #|      
        #|      
        #|      
        #|      
        #|    
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/marker-006.svg",
      (
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|    
        #|    
        #|    Basic Markers
        #|    
        #|    
        #|    Start, Middle and End
        #|    
        #|    
        #|    Automatic Orientation
        #|    
        #|
        #|
      ),
      (
        #|
        #|  Basic Markers
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|  Start, Middle and End
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|  Automatic Orientation
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|
      ),
      300,
      300,
      -1,
      -1,
    ),
    case(
      "painting/marker-007.svg",
      (
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|    
        #|        
        #|            
        #|        
        #|        
        #|          
        #|            
        #|          
        #|        
        #|    
        #|    
        #|    
        #|
        #|
      ),
      (
        #|
        #|    
        #|    
        #|
        #|
      ),
      300,
      300,
      1,
      10,
    ),
    case(
      "painting/marker-009.svg",
      (
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|    
        #|
        #|    
        #|
        #|
      ),
      (
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|
        #|
      ),
      500,
      500,
      2,
      50,
    ),
    case(
      "painting/marker-orient-001.svg",
      (
        #|
        #|    
        #|    
        #|    
        #|    
        #|        
        #|            
        #|        
        #|     
        #|    
        #|    
        #|    
        #|    
        #|    
        #|    
        #|
        #|
      ),
      (
        #|
        #|    
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|        
        #|            
        #|        
        #|     
        #|    
        #|    
        #|    
        #|    
        #|    
        #|    
        #|
        #|
      ),
      500,
      500,
      -1,
      -1,
    ),
    case(
      "painting/reftests/fallback-001.svg",
      (
        #|
        #|  SVG paint server: without fallback color nothing is painted
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/reftests/fallback-002.svg",
      (
        #|
        #|  SVG paint server: paint fallback color
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/reftests/gradient-external-reference.svg",
      (
        #|
        #|
        #|
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|  External file reference for gradient
        #|  
        #|  
        #|  
        #|  
        #|  
        #|
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/reftests/marker-external-reference.svg",
      (
        #|
        #|
        #|
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|  External file reference for marker
        #|  
        #|  
        #|  
        #|
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/reftests/marker-path-001.svg",
      (
        #|
        #|  
        #|    Markers on Path (Linear).
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Path (Linear).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|      
        #|        
        #|        
        #|        
        #|        
        #|      
        #|      
        #|        
        #|        
        #|        
        #|        
        #|      
        #|      
        #|        
        #|        
        #|        
        #|        
        #|      
        #|
        #|      
        #|      
        #|    
        #|
        #|    
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      15,
      49,
    ),
    case(
      "painting/reftests/marker-path-002.svg",
      (
        #|
        #|  
        #|    Markers on Path (Bezier).
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|    
        #|  
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Path (Bezier).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|      
        #|      
        #|      
        #|      
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|      
        #|      
        #|      
        #|      
        #|    
        #|    
        #|    
        #|    
        #|
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      7,
      935,
    ),
    case(
      "painting/reftests/marker-path-003.svg",
      (
        #|
        #|  
        #|    Markers on Path (Arc).
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|  
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Path (Arc).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|      
        #|      
        #|      
        #|      
        #|    
        #|    
        #|
        #|    
        #|      
        #|      
        #|      
        #|      
        #|    
        #|    
        #|
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/marker-path-011.svg",
      (
        #|
        #|  
        #|    Markers on Sub-Path (Linear).
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Sub-Path (Linear).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|      
        #|      
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|      
        #|      
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|      
        #|      
        #|    
        #|    
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      3,
      3,
    ),
    case(
      "painting/reftests/marker-path-012.svg",
      (
        #|
        #|  
        #|    Markers on Sub-Path (Bezier).
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|  
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Sub-Path (Bezier).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|      
        #|      
        #|      
        #|      
        #|    
        #|    
        #|
        #|    
        #|      
        #|      
        #|      
        #|      
        #|    
        #|    
        #|
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      7,
      14,
    ),
    case(
      "painting/reftests/marker-path-013.svg",
      (
        #|
        #|  
        #|    Markers on Sub-Path (Arc).
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|  
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Sub-Path (Arc).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|
        #|    
        #|      
        #|      
        #|      
        #|      
        #|    
        #|    
        #|
        #|    
        #|      
        #|      
        #|      
        #|      
        #|    
        #|    
        #|
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/marker-path-021.svg",
      (
        #|
        #|  
        #|    Markers on Closed Sub-Path (Linear).
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|  
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Closed Sub-Path (Linear).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/marker-path-022.svg",
      (
        #|
        #|  
        #|    Markers on Closed Sub-Path (Bezier).
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Closed Sub-Path (Bezier).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/marker-path-023.svg",
      (
        #|
        #|  
        #|    Markers on Closed Sub-Path (Arc).
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|
        #|  
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Markers on Closed Sub-Path (Arc).
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|    
        #|    
        #|    
        #|
        #|    
        #|
        #|  
        #|
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/markers-orient-002.svg",
      (
        #|
        #|  orient='auto' with 180 degree turns
        #|  
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "painting/reftests/mask-print.svg",
      (
        #|
        #|
        #|
        #|
        #|
        #|
        #|
        #|
        #|
        #|
        #|
        #|
        #|
        #|
        #|
      ),
      (
        #|
        #|
        #|
        #|
        #|
        #|
        #|
      ),
      200,
      200,
      1,
      17280,
    ),
    case(
      "painting/reftests/paint-context-003.svg",
      (
        #|
        #|  
        #|    Paint: 'context-fill' and 'context-stroke' vis-a-vis 'currentcolor'
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|  
        #|
      ),
      (
        #|
        #|  
        #|    Paint: 'context-fill' and 'context-stroke' vis-a-vis 'currentcolor'
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|  
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/paint-context-004.svg",
      (
        #|
        #|  
        #|    Paint: 'context-fill' and 'context-stroke' with paint server
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|      
        #|    
        #|
        #|    
        #|      
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|  
        #|
      ),
      (
        #|
        #|  
        #|    Paint: 'context-fill' and 'context-stroke' with paint server
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|      
        #|    
        #|
        #|    
        #|      
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|  
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/paint-context-006.svg",
      (
        #|
        #|  
        #|    Paint: 'context-fill' for markers with gradient
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|      
        #|    
        #|
        #|    
        #|      
        #|    
        #|
        #|    
        #|      
        #|        
        #|        A
        #|        
        #|      
        #|    
        #|  
        #|
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Paint: 'context-fill' for markers with gradient
        #|    
        #|  
        #|
        #|  
        #|    
        #|        
        #|        
        #|    
        #|  
        #|
        #|  
        #|  A
        #|
        #|
      ),
      512,
      512,
      -1,
      -1,
    ),
    case(
      "painting/reftests/paint-context-007.svg",
      (
        #|
        #|  
        #|    Paint: 'context-fill' and 'context-stroke' in 'use' with transform
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|      
        #|    
        #|
        #|    
        #|      
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Paint: 'context-fill' and 'context-stroke' in 'use' with transform
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|      
        #|    
        #|
        #|    
        #|      
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|  
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/paint-context-008.svg",
      (
        #|
        #|  
        #|    Paint: paint server transform for 'context-fill' based on nearest 'use' ancestor
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|
        #|    
        #|      
        #|    
        #|
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    Paint: paint server transform for 'context-fill' based on nearest 'use' ancestor
        #|    
        #|  
        #|
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|    
        #|  
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "painting/reftests/paint-order-002.svg",
      (
        #|
        #|  
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|
        #|  
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|    
        #|      
        #|      
        #|    
        #|    
        #|      
        #|      
        #|      
        #|    
        #|    
        #|      
        #|      
        #|      
        #|    
        #|    
        #|      
        #|      
        #|      
        #|    
        #|    
        #|      
        #|      
        #|      
        #|    
        #|  
        #|
        #|  
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      280,
      220,
      -1,
      -1,
    ),
    case(
      "painting/reftests/paint-order-003.svg",
      (
        #|
        #|  
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      test
        #|    
        #|  
        #|
        #|  
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      test
        #|    
        #|    
        #|      test
        #|      test
        #|    
        #|    
        #|      test
        #|      test
        #|      test
        #|    
        #|    
        #|      test
        #|      test
        #|      test
        #|    
        #|    
        #|      test
        #|      test
        #|      test
        #|    
        #|    
        #|      test
        #|      test
        #|      test
        #|    
        #|  
        #|
        #|  
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|    
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      280,
      220,
      -1,
      -1,
    ),
    case(
      "painting/reftests/pattern-external-reference.svg",
      (
        #|
        #|
        #|
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|  
        #|    
        #|  
        #|
        #|  External file reference for pattern
        #|  
        #|  
        #|  
        #|  
        #|  
        #|
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/fill-fallback-currentcolor-1.svg",
      (
        #|
        #|  
        #|  
        #|    
        #|  
        #|  
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/fill-fallback-currentcolor-2.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/fill-fallback-invalid-uri.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/fill-fallback-none-1.svg",
      (
        #|
        #|  
        #|  
        #|    
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/fill-fallback-none-2.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/fill-fallback-none-3.svg",
      (
        #|
        #|  
        #|  
        #|    
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/gradient-inheritance-not-in-rendertree-01.tentative.svg",
      (
        #|
        #|  <linearGradient> (without content) inheriting from a <linearGradient> in an invalid context
        #|  
        #|  
        #|  
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/gradient-inheritance-not-in-rendertree-02.tentative.svg",
      (
        #|
        #|  <linearGradient> (with content) inheriting from a <linearGradient> in an invalid context
        #|  
        #|  
        #|  
        #|    
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/gradient-transform-01.svg",
      (
        #|
        #|  Gradients with non-invertible gradientTransforms, linearGradient
        #|  
        #|  
        #|  
        #|
        #|  
        #|    
        #|    
        #|  
        #|  
        #|
        #|  
        #|    
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/gradient-transform-02.svg",
      (
        #|
        #|  Gradients with non-invertible gradientTransforms, radialGradient
        #|  
        #|  
        #|  
        #|
        #|  
        #|    
        #|    
        #|  
        #|  
        #|
        #|  
        #|    
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/pattern-inheritance-not-in-rendertree-01.tentative.svg",
      (
        #|
        #|  <pattern> (without content) inheriting from a <pattern> in an invalid context
        #|  
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/pattern-inheritance-not-in-rendertree-02.tentative.svg",
      (
        #|
        #|  <pattern> (with content) inheriting from a <pattern> in an invalid context
        #|  
        #|  
        #|    
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/pattern-opacity-01.svg",
      (
        #|
        #|  
        #|    Pattern: fill-opacity
        #|    
        #|    
        #|  
        #|  
        #|    >
        #|      
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/pattern-text-01.svg",
      (
        #|
        #|  
        #|    pattern on text elements
        #|    
        #|    
        #|    
        #|  
        #|  
        #|    
        #|      
        #|    
        #|    
        #|      
        #|    
        #|  
        #|  
        #|
        #|  
        #|  XXXXXXXX
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/pattern-transform-01.svg",
      (
        #|
        #|  
        #|    Pattern: with patternTransform
        #|    
        #|    
        #|  
        #|    
        #|      
        #|        
        #|      
        #|    
        #|    
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|
        #|
      ),
      2,
      2,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/pattern-transform-02.svg",
      (
        #|
        #|  Patterns with non-invertible patternTransforms
        #|  
        #|  
        #|  
        #|
        #|  
        #|    
        #|  
        #|  
        #|
        #|  
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/pattern-viewbox-01.svg",
      (
        #|
        #|  
        #|    Pattern: viewBox with x offset
        #|    
        #|    
        #|  
        #|  
        #|    
        #|      
        #|      
        #|    
        #|  
        #|  
        #|
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|      
        #|      
        #|    
        #|  
        #|  
        #|
        #|
      ),
      512,
      512,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/radialgradient-fully-overlapping.svg",
      (
        #|
        #|  Radial gradient with overlapping start and end circles
        #|  
        #|    
        #|    
        #|    
        #|  
        #|
        #|  
        #|
        #|  
        #|    
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "pservers/reftests/stroke-fallback-invalid-uri.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      50,
      50,
      -1,
      -1,
    ),
    case(
      "struct/reftests/gradient-in-symbol.svg",
      (
        #|
        #|  <symbol> with a gradient inside
        #|  
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/inner-svg-css-transform.svg",
      (
        #|
        #|  
        #|  
        #|  Test that transforms the inner svg element using css
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/inner-svg-rotate-transform.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|  Test that rotates the inner svg element
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/inner-svg-transform-and-viewbox.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|  
        #|  Test that transforms the inner svg element with viewBox specified
        #|  
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|      
        #|      
        #|    
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/inner-svg-transform.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|  Test that transforms the inner svg element
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|      
        #|    
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/outer-svg-transform.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|  Test that transforms the outer svg element"
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|    
        #|  
        #|
        #|
      ),
      400,
      400,
      -1,
      -1,
    ),
    case(
      "struct/reftests/requiredextensions-empty-string.svg",
      (
        #|
        #|  requiredExtensions: present but empty attribute evaluates to false
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-a.svg",
      (
        #|
        #|  Testing that 'use' can target 'a' elements
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-data-url.tentative.svg",
      (
        #|
        #|  <use> with a data: URL resource
        #|  
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-encoding.svg",
      (
        #|
        #|  <use> with an encoded href
        #|  
        #|  
        #|  
        #|    
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-no-tspan.svg",
      (
        #|
        #|  Testing that 'use' cannot make 'tspan' elements visible
        #|  
        #|  
        #|    Should not see this
        #|  
        #|  
        #|
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-svg-dimensions-override-001.svg",
      (
        #|
        #|  'width' and 'height' from <use> overrides values on referenced <svg>
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      512,
      512,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-svg-dimensions-override-002.svg",
      (
        #|
        #|  'width' and 'height' from <use> overrides values on referenced <svg>
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      512,
      512,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-svg-inline-css.svg",
      (
        #|
        #|  Width and Height as inline CSS properties on use and referencing svg element
        #|  
        #|    
        #|    
        #|    
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      500,
      500,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-switch.svg",
      (
        #|
        #|  Testing that 'use' can target 'switch' elements
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-symbol-dimensions-override-001.svg",
      (
        #|
        #|  'width' and 'height' from <use> overrides values on referenced <symbol>
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      512,
      512,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-symbol-dimensions-override-002.svg",
      (
        #|
        #|  'width' and 'height' from <use> overrides values on referenced <symbol>
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      512,
      512,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-symbol-display-none.svg",
      (
        #|
        #|  <use> with a display="none" symbol
        #|  
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-symbol-inline-css-001.svg",
      (
        #|
        #|  Width and Height as inline CSS properties on use and referencing symbol element
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      500,
      500,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-symbol-inline-css-002.svg",
      (
        #|
        #|  Width and Height as inline CSS properties on use and referencing symbol element doesn't have its width and height
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      500,
      500,
      -1,
      -1,
    ),
    case(
      "struct/reftests/use-symbol-inline-css-003.svg",
      (
        #|
        #|  No Width and Height defined on use and referencing symbol element has its width and height
        #|  
        #|    
        #|    
        #|    
        #|    
        #|  
        #|  
        #|    
        #|      
        #|    
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      500,
      500,
      -1,
      -1,
    ),
    case(
      "styling/color-inherit-link-visited.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "styling/css-var-on-length-attributes-03.svg",
      (
        #|
        #|  Usage of css var() with default fallback on svg width and height attributes (units specified)
        #|  
        #|  
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "styling/image-sizing-min-content.tentative.svg",
      (
        #|
        #|  Width and Height (in auto) as presentation attributes on image
        #|  
        #|  
        #|  
        #|
      ),
      (
        #|
        #|  
        #|
      ),
      300,
      150,
      -1,
      -1,
    ),
    case(
      "styling/outermost-svg-sizing-viewport-units.svg",
      (
        #|
        #|  Width and Height (in viewport units) as presentation attributes on outermost svg
        #|  
        #|  
        #|    
        #|
        #|
      ),
      (
        #|
        #|    
        #|
        #|
      ),
      10,
      10,
      -1,
      -1,
    ),
    case(
      "styling/rect-sizing-viewport-units.svg",
      (
        #|
        #|  Width and Height (in viewport units) as presentation attributes on rect
        #|  
        #|  
        #|    
        #|
        #|
      ),
      (
        #|
        #|    
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
    case(
      "styling/stroke-color-inherit-link-visited.svg",
      (
        #|
        #|  
        #|  
        #|  
        #|  
        #|    
        #|  
        #|
        #|
      ),
      (
        #|
        #|  
        #|
        #|
      ),
      100,
      100,
      -1,
      -1,
    ),
  ]
}

///|
fn case(
  name : String,
  test_svg : String,
  ref_svg : String,
  width : Int,
  height : Int,
  max_diff : Int,
  max_pixels : Int,
) -> WptCase {
  { name, test_svg, ref_svg, width, height, max_diff, max_pixels }
}