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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/repaint/subpixel-shadow-included-in-invalidation.html

Issue 1880763002: Merge repaintRects and paintInvalidationObjects in text-based-repaint test results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 #box { 3 #box {
4 position: absolute; 4 position: absolute;
5 left: 0; 5 left: 0;
6 top: 0; 6 top: 0;
7 width: 100px; 7 width: 100px;
8 height: 100px; 8 height: 100px;
9 background: green; 9 background: green;
10 box-shadow: 1.4px 1.4px blue; 10 box-shadow: 1.4px 1.4px blue;
(...skipping 17 matching lines...) Expand all
28 if (!window.internals) { 28 if (!window.internals) {
29 testFailed('Test requires window.internals.'); 29 testFailed('Test requires window.internals.');
30 finishJSTest(); 30 finishJSTest();
31 } else { 31 } else {
32 var box = document.getElementById('box'); 32 var box = document.getElementById('box');
33 runAfterLayoutAndPaint(function() { 33 runAfterLayoutAndPaint(function() {
34 internals.startTrackingRepaints(document); 34 internals.startTrackingRepaints(document);
35 box.style.boxShadow = 'none'; 35 box.style.boxShadow = 'none';
36 36
37 runAfterLayoutAndPaint(function() { 37 runAfterLayoutAndPaint(function() {
38 var layerTree = JSON.parse(internals.layerTreeAsText(document, inter nals.LAYER_TREE_INCLUDES_REPAINT_RECTS)); 38 var layerTree = JSON.parse(internals.layerTreeAsText(document, inter nals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS));
39 var repaintRects = layerTree.children[0].repaintRects; 39 var repaintRects = layerTree.children[0].repaintRects;
40 var shadowRect = [1.4, 1.4, 100, 100]; 40 var shadowRect = [1.4, 1.4, 100, 100];
41 if (repaintRects.some(repaintRect => rectContainsRect(repaintRect, s hadowRect))) 41 if (repaintRects.some(repaintRect => rectContainsRect(repaintRect, s hadowRect)))
42 testPassed('Subpixel shadow was repainted.'); 42 testPassed('Subpixel shadow was repainted.');
43 else 43 else
44 testFailed('Subpixel shadow ' + JSON.stringify(shadowRect) + ' w as not repainted. Repaint rects were ' + JSON.stringify(repaintRects) + '.'); 44 testFailed('Subpixel shadow ' + JSON.stringify(shadowRect) + ' w as not repainted. Repaint rects were ' + JSON.stringify(repaintRects) + '.');
45 45
46 internals.stopTrackingRepaints(document); 46 internals.stopTrackingRepaints(document);
47 box.remove(); 47 box.remove();
48 finishJSTest(); 48 finishJSTest();
49 }); 49 });
50 }); 50 });
51 } 51 }
52 </script> 52 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698