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

Side by Side Diff: LayoutTests/fast/multicol/image-inside-nested-blocks-with-border.html

Issue 299373006: Move old multicol tests to a separate directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
(Empty)
1 <html>
2 <body>
3 <div id="tests" style="-webkit-column-count:2; -webkit-column-gap:0; column-coun t:2; column-gap:0; column-fill:auto; height:300px; width:600px;">
4 <div style="height:280px"></div>
5 <div id="f1" style="border:5px solid black; float:left">
6 <img style="display:block;width:140px;height:80px;">
7 </div>
8 </div>
9 <div id="result"></div>
10 <script>
11 function floatOffset(float)
12 {
13 var parentRect = document.getElementById('tests').getBoundingClientRect( );
14 var rect = float.getBoundingClientRect();
15 return { width: rect.left - parentRect.left, height: rect.top - parentRe ct.top };
16 }
17
18 var tests = [
19 ["f1", 300, 0]
20 ];
21
22 var test;
23 var failures = 0;
24 while (test = tests.shift()) {
25 var float = document.getElementById(test[0]);
26 var result = floatOffset(float);
27 var passed = result.width === test[1] && result.height === test[2]
28 float.style.backgroundColor = passed ? "green" : "red";
29 if (!passed)
30 failures++
31 }
32
33 if (window.testRunner) {
34 testRunner.dumpAsText();
35 document.getElementById("tests").style.display = "none";
36 }
37
38 document.getElementById("result").innerText = failures ? "FAIL: " + failures + " cases failed" : "PASS";
39 </script>
40
41
42
43 </body>
44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698