switch-01.svg 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0"?>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/publicdomain/zero/1.0/
  5. -->
  6. <svg version="1.1" xmlns="http://www.w3.org/2000/svg">
  7. <title>Testcase for switch</title>
  8. <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=409383 -->
  9. <rect width="100%" height="100%" fill="lime"/>
  10. <rect x="50" y="100" width="50" height="50" fill="red"/>
  11. <switch>
  12. <!-- first switch item is visible -->
  13. <rect x="50" y="100" width="50" height="50" fill="lime"/>
  14. <rect x="50" y="100" width="50" height="50" fill="red"/>
  15. <rect x="50" y="100" width="50" height="50" fill="red"/>
  16. <rect x="50" y="100" width="50" height="50" fill="red"/>
  17. <rect x="50" y="100" width="50" height="50" fill="red"/>
  18. <rect x="50" y="100" width="50" height="50" fill="red"/>
  19. <rect x="50" y="100" width="50" height="50" fill="red"/>
  20. <rect x="50" y="100" width="50" height="50" fill="red"/>
  21. <rect x="50" y="100" width="50" height="50" fill="red"/>
  22. <rect x="50" y="100" width="50" height="50" fill="red"/>
  23. <rect x="50" y="100" width="50" height="50" fill="red"/>
  24. <rect x="50" y="100" width="50" height="50" fill="red"/>
  25. </switch>
  26. <rect x="200" y="100" width="50" height="50" fill="red"/>
  27. <switch>
  28. <!-- test non-matching system language -->
  29. <rect systemLanguage="foo" x="200" y="100" width="50" height="50" fill="red"/>
  30. <rect x="200" y="100" width="50" height="50" fill="lime"/>
  31. <rect x="200" y="100" width="50" height="50" fill="red"/>
  32. <rect x="200" y="100" width="50" height="50" fill="red"/>
  33. </switch>
  34. <rect x="50" y="200" width="50" height="50" fill="red"/>
  35. <switch>
  36. <!-- test matching required features -->
  37. <rect requiredFeatures="http://www.w3.org/TR/SVG11/feature#CoreAttribute http://www.w3.org/TR/SVG11/feature#Gradient"
  38. x="50" y="200" width="50" height="50" fill="lime"/>
  39. <rect x="50" y="200" width="50" height="50" fill="red"/>
  40. <rect x="50" y="200" width="50" height="50" fill="red"/>
  41. </switch>
  42. <!-- this rectangle intentionally left green -->
  43. <rect x="200" y="200" width="50" height="50" fill="lime"/>
  44. <rect x="50" y="300" width="50" height="50" fill="red"/>
  45. <switch>
  46. <!-- test non-matching required extensions -->
  47. <rect requiredExtensions="foo" x="50" y="300" width="50" height="50" fill="red"/>
  48. <rect x="50" y="300" width="50" height="50" fill="lime"/>
  49. <rect x="50" y="300" width="50" height="50" fill="red"/>
  50. <rect x="50" y="300" width="50" height="50" fill="red"/>
  51. </switch>
  52. <switch>
  53. <!-- test display:none - should see nothing here -->
  54. <rect style="display: none;" x="200" y="300" width="50" height="50" fill="red"/>
  55. <rect x="200" y="300" width="50" height="50" fill="red"/>
  56. </switch>
  57. </svg>