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

Side by Side Diff: sky/tests/lowlevel/style-basic.sky

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 <html> 2 <html>
3 <import src="../resources/dump-as-text.sky" /> 3 <import src="../resources/dump-as-text.sky" />
4 <style> 4 <style>
5 #id1 { order: 1; } 5 #id1 { order: 1; }
6 .class2 { order: 2; } 6 .class2 { order: 2; }
7 tag-name-3 { order: 3; } 7 tag-name-3 { order: 3; }
8 .class4.class4 { order: 4; } 8 .class4.class4 { order: 4; }
9 .class5#id5 { order: 5; } 9 .class5#id5 { order: 5; }
10 tag-name-6.class6#id6 { order: 6; } 10 tag-name-6.class6#id6 { order: 6; }
11 </style> 11 </style>
12 <body> 12 <body>
13 <div id="tests"> 13 <div id="tests">
14 <div id="id1"></div> 14 <div id="id1"></div>
15 <div class="class2"></div> 15 <div class="class2"></div>
16 <tag-name-3></tag-name-3> 16 <tag-name-3></tag-name-3>
17 <div class="class4 class4"></div> 17 <div class="class4 class4"></div>
18 <div class="class5" id="id5"></div> 18 <div class="class5" id="id5"></div>
19 <tag-name-6 class="class6" id="id6"></tag-name-6> 19 <tag-name-6 class="class6" id="id6"></tag-name-6>
20 </div> 20 </div>
21 <div id="log"></div> 21 <div id="log"></div>
22 <script> 22 <script>
23 import "dart:sky";
24
25 main() {
23 var tests = document.getElementById("tests"); 26 var tests = document.getElementById("tests");
24 var log = document.getElementById("log"); 27 var log = document.getElementById("log");
25 var i = 1; 28 var i = 1;
26 for (var element = tests.firstElementChild; element; element = element.n extElementSibling, ++i) { 29 for (var element = tests.firstElementChild; element != null; element = e lement.nextElementSibling) {
27 var order = getComputedStyle(element).order; 30 var order = int.parse(window.getComputedStyle(element).getPropertyVa lue("order"));
28 var div = document.createElement("div"); 31 var div = document.createElement("div");
29 var text = (order == i) ? "PASS" : "FAIL"; 32 var text = (order == i) ? "PASS" : "FAIL";
30 text += ": <" 33 text += ": <"
31 + element.tagName 34 + element.tagName
32 + " class=" 35 + " class="
33 + element.classList 36 + element.classList.toString()
34 + " id=" + element.id 37 + " id=" + element.id
35 + "> order was " 38 + "> order was "
36 + order; 39 + order.toString();
37 if (order != i) 40 if (order != i)
38 text += " expected " + i; 41 text += " expected " + i;
39 div.textContent = text; 42 div.textContent = text;
40 log.appendChild(div); 43 log.appendChild(div);
44 ++i;
41 } 45 }
46 }
42 </script> 47 </script>
43 </body> 48 </body>
44 </html> 49 </html>
OLDNEW
« no previous file with comments | « sky/tests/lowlevel/query-selector-expected.txt ('k') | sky/tests/lowlevel/style-specificity.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698