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

Side by Side Diff: LayoutTests/imported/csswg-test/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001.html

Issue 1295773004: update-w3c-deps import using blink c936ac9d274f959a4b5908db6835bcd612fb1a9e: (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 <title>CSS Writing Modes Test: Shrink-to-fit with orthogonal children</title> 2 <title>CSS Writing Modes Test: Shrink-to-fit with orthogonal children</title>
3 <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#orthogonal-flow s"> 3 <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#orthogonal-flow s">
4 <meta name="assert" content="Shrink-to-fit with orthogonal children"> 4 <meta name="assert" content="Shrink-to-fit with orthogonal children">
5 <meta name="flags" content="ahem combo"> 5 <meta name="flags" content="ahem combo">
6 <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com"> 6 <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com">
7 <script src="../../../resources/testharness.js"></script> 7 <script src="../../../resources/testharness.js"></script>
8 <script src="../../../resources/testharnessreport.js"></script> 8 <script src="../../../resources/testharnessreport.js"></script>
9 <link rel="stylesheet" href="../../../resources/testharness.css"> 9 <link rel="stylesheet" href="../../../resources/testharness.css">
10 <style> 10 <style>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (window.location.search == "?wait") { 149 if (window.location.search == "?wait") {
150 console.log("Sleeping 5 secs for debug"); 150 console.log("Sleeping 5 secs for debug");
151 setup({explicit_done:true}); 151 setup({explicit_done:true});
152 window.setTimeout(run, 5000); 152 window.setTimeout(run, 5000);
153 } else { 153 } else {
154 run(); 154 run();
155 } 155 }
156 156
157 function run() { 157 function run() {
158 Array.prototype.forEach.call(document.querySelectorAll(".test"), function (n ode) { 158 Array.prototype.forEach.call(document.querySelectorAll(".test"), function (n ode) {
159 var title = node.previousElementSibling.innerText; 159 var title = node.previousElementSibling.textContent;
160 test(function () { 160 test(function () {
161 try { 161 try {
162 var targetNode = node.querySelector(".target"); 162 var targetNode = node.querySelector(".target");
163 var fontSize = parseFloat(getComputedStyle(targetNode).fontSize) ; 163 var fontSize = parseFloat(getComputedStyle(targetNode).fontSize) ;
164 var targetBounds = targetNode.getBoundingClientRect(); 164 var targetBounds = targetNode.getBoundingClientRect();
165 assert_less_than_equal(targetBounds.width, fontSize * 2.01, "wri ting-mode is vertical") 165 assert_less_than_equal(targetBounds.width, fontSize * 2.01, "wri ting-mode is vertical")
166 var nextNode = node.querySelector(".next"); 166 var nextNode = node.querySelector(".next");
167 var nextBounds = nextNode.getBoundingClientRect(); 167 var nextBounds = nextNode.getBoundingClientRect();
168 assert_equals(nextBounds.left - targetBounds.right, 0, "the left edge of the orange box touches the right edge of the blue box"); 168 assert_equals(nextBounds.left - targetBounds.right, 0, "the left edge of the orange box touches the right edge of the blue box");
169 } catch (e) { 169 } catch (e) {
170 node.previousElementSibling.classList.add("fail"); 170 node.previousElementSibling.classList.add("fail");
171 throw e; 171 throw e;
172 } 172 }
173 }, title); 173 }, title);
174 }); 174 });
175 if (window.testRunner) 175 if (window.testRunner)
176 container.style.display = "none"; 176 container.style.display = "none";
177 done(); 177 done();
178 } 178 }
179 </script> 179 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698