blob: 9d1c1db46d62c26721c26049c00775976b61caa3 [file] [log] [blame]
Test css.getBackgroundColors method
Running test: testNoText
No text (and not a positioned element): should be null
{}
Running test: testNoBgColor
No background color: should be white
{"backgroundColors":["rgb(255, 255, 255)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testOpaqueBgColor
Opaque background color: should be red
{"backgroundColors":["rgb(255, 0, 0)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testNoDirectText
No direct text: should be red
{"backgroundColors":["rgb(255, 0, 0)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testLayeredOpaqueBgColors
Opaque background color in front of another opaque background color: should be blue
{"backgroundColors":["rgb(0, 0, 255)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testOneSemitransparentBgColor
Semi-transparent background color: should be light red
{"backgroundColors":["rgb(255, 127, 127)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testTwoSemitransparentBgColors
Two layered semi-transparent background colors: should be medium red
{"backgroundColors":["rgb(255, 63, 63)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testOpaqueGradientBackground
Opaque gradient: should be red and black
{"backgroundColors":["rgb(255, 0, 0)","rgb(0, 0, 0)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testOpaqueGradientBackgroundBehindScrim
Opaque gradient behind semi-transparent color: should be light red and 50% grey
{"backgroundColors":["rgb(255, 128, 128)","rgb(128, 128, 128)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testOpaqueGradientBackgroundWithColorBackground
Opaque gradient and solid color background on same element: should be red and black
{"backgroundColors":["rgb(255, 0, 0)","rgb(0, 0, 0)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testPartiallyTransparentGradientBackground
Semi-transparent gradient: should be light red and 50% grey
{"backgroundColors":["rgb(255, 127, 127)","rgb(127, 127, 127)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testPartiallyTransparentGradientAndColorBackground
Semi-transparent gradient and solid color on same element: should be dark red and 50% grey
{"backgroundColors":["rgb(128, 0, 0)","rgb(128, 128, 128)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testTwoPartiallyTransparentGradientBackgrounds
Layered semi-transparent gradients: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testPartiallyOverlappingBackground
Partially overlapping background: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: smallerBackground
Background smaller than text: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testObscuredPartiallyOverlappingBackground
Red background obscuring partially overlapping blue background: should be red only
{"backgroundColors":["rgb(255, 0, 0)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testBackgroundImage
Background image: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testBackgroundImageAndBgColor
Background image with background color: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testBackgroundImageBehindScrim
Background image behind scrim: should be semi-transparent white
{"backgroundColors":["rgba(255, 255, 255, 0.5)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testForegroundImage
Image behind text: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testForegroundImageBehindScrim
Image behind scrim: should be semi-transparent white
{"backgroundColors":["rgba(255, 255, 255, 0.5)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testForegroundCanvas
Canvas behind text: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testForegroundEmbed
Embed behind text: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testForegroundObject
Object behind text: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testForegroundPicture
Picture behind text: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testForegroundSVG
SVG behind text: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testForegroundVideo
Video behind text: should be empty array
{"backgroundColors":[],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}
Running test: testShadowDOM
Background color in Shadow DOM: should be blue
{"backgroundColors":["rgb(0, 0, 255)"],"computedFontSize":"16px","computedFontWeight":"400","computedBodyFontSize":"16px"}