Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: third_party/WebKit/LayoutTests/paint/background/background-and-shadow.html

Issue 2464053003: Always paint background and shadow separately (Closed)
Patch Set: Rebaseline-cl (invisible pixel changes along shadow edges) (The original Patch Set 2 was removed to get the try result in Patch Set 1) Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/paint/background/background-and-shadow.html
diff --git a/third_party/WebKit/LayoutTests/paint/background/background-and-shadow.html b/third_party/WebKit/LayoutTests/paint/background/background-and-shadow.html
new file mode 100644
index 0000000000000000000000000000000000000000..f18c5e4d2a1910aa648728fe857611797d85b0ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/paint/background/background-and-shadow.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<style>
+div {
+ margin-bottom: 20px;
+ width: 100px;
+ height: 100px;
+}
+.background-and-shadow {
+ background-color: blue;
+ /* The image is 1x1 lime */
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12Ng+M8AAAICAQCqKp4nAAAAAElFTkSuQmCC');
+ box-shadow: 0 10px black;
+}
+</style>
+Tests background color/image and shadow painting with static and dynamic style.
+Passes if there are two green squares with black shadows.
+<div class="background-and-shadow"></div>
+<div id="target"></div>
+<script>
+function test() {
+ // Apply background and shadow styles to target after the image has
+ // been loaded and decoded, to test the dynamic behavior.
+ target.className = 'background-and-shadow';
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.capturePixelsAsyncThen(test);
+} else {
+ setTimeout(test, 500);
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698