 Chromium Code Reviews
 Chromium Code Reviews Issue 2716583002:
  Avoid negative content box sizes.  (Closed)
    
  
    Issue 2716583002:
  Avoid negative content box sizes.  (Closed) 
  | Index: third_party/WebKit/LayoutTests/fast/block/large-border-abspos.html | 
| diff --git a/third_party/WebKit/LayoutTests/fast/block/large-border-abspos.html b/third_party/WebKit/LayoutTests/fast/block/large-border-abspos.html | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..d1c0f995c85286d1d93127fd296bf9a1454666a1 | 
| --- /dev/null | 
| +++ b/third_party/WebKit/LayoutTests/fast/block/large-border-abspos.html | 
| @@ -0,0 +1,14 @@ | 
| +<!DOCTYPE html> | 
| +<!-- The left offset here is just to push the huge thing out of view, so that a | 
| + human (yes, YOU!) can see the test results. --> | 
| +<div style="position:absolute; left:100%; border-width:1234567890px; border-style:solid;"> | 
| 
mstensho (USE GERRIT)
2017/02/23 13:35:09
This test is valid, but it would also pass prior t
 
eae
2017/02/23 15:54:37
Agreed!
 | 
| + <div id="abspos" style="position:absolute; left:0; top:0; right:0; bottom:0;"></div> | 
| +</div> | 
| +<script src="../../resources/testharness.js"></script> | 
| +<script src="../../resources/testharnessreport.js"></script> | 
| +<script> | 
| + test(() => { | 
| + assert_equals(document.getElementById("abspos").offsetWidth, 0); | 
| + assert_equals(document.getElementById("abspos").offsetHeight, 0); | 
| + }, "Sizes should never become negative"); | 
| +</script> |