diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-images/image-set/resources')
-rw-r--r-- | testing/web-platform/tests/css/css-images/image-set/resources/image-set-rendering-helper.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-images/image-set/resources/image-set-rendering-helper.js b/testing/web-platform/tests/css/css-images/image-set/resources/image-set-rendering-helper.js new file mode 100644 index 0000000000..5045679b4c --- /dev/null +++ b/testing/web-platform/tests/css/css-images/image-set/resources/image-set-rendering-helper.js @@ -0,0 +1,27 @@ +function setupTest() { + createPassingNotice(); + createTestDiv(); +} + +function createPassingNotice() { + const notice = document.createElement('p'); + + notice.textContent = + 'Test passes if the image below is green when devicePixelRatio is 1, not red.'; + + document.body.appendChild(notice); +} + +function createTestDiv() { + const testDiv = document.createElement('div'); + + testDiv.id = 'test'; + + testDiv.style.width = '100px'; + testDiv.style.height = '100px'; + testDiv.style.backgroundColor = 'red'; + + document.body.appendChild(testDiv); +} + +document.addEventListener("DOMContentLoaded", setupTest); |