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

Side by Side Diff: LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js

Issue 17155007: [CSS3] Parsing the property, text-justify. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parsingTextJustify
Patch Set: Created 7 years, 6 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 function testComputedStyle(a_value, c_value) 1 function testComputedStyle(a_value, c_value)
2 { 2 {
3 shouldBe("window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-tex t-align-last').cssText", "'" + a_value + "'"); 3 shouldBe("window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-tex t-justify').cssText", "'" + a_value + "'");
4 shouldBe("window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-a lign-last').cssText", "'" + c_value + "'"); 4 shouldBe("window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-j ustify').cssText", "'" + c_value + "'");
5 debug(''); 5 debug('');
6 } 6 }
7 7
8 function ownValueTest(a_value, c_value) 8 function ownValueTest(a_value, c_value)
9 { 9 {
10 debug("Value of ancestor is '" + a_value + ", while child is '" + c_value + "':"); 10 debug("Value of ancestor is '" + a_value + ", while child is '" + c_value + "':");
11 ancestor.style.webkitTextAlignLast = a_value; 11 ancestor.style.webkitTextJustify = a_value;
12 child.style.webkitTextAlignLast = c_value; 12 child.style.webkitTextJustify = c_value;
13 testComputedStyle(a_value, c_value); 13 testComputedStyle(a_value, c_value);
14 } 14 }
15 15
16 function inheritanceTest(a_value) 16 function inheritanceTest(a_value)
17 { 17 {
18 debug("Value of ancestor is '" + a_value + "':"); 18 debug("Value of ancestor is '" + a_value + "':");
19 ancestor.style.webkitTextAlignLast = a_value; 19 ancestor.style.webkitTextJustify = a_value;
20 testComputedStyle(a_value, a_value); 20 testComputedStyle(a_value, a_value);
21 } 21 }
22 22
23 description("This test checks that the value of -webkit-text-align-last is prope rly inherited to the child."); 23 description("This test checks that the value of -webkit-text-justify is properly inherited to the child.");
24 24
25 ancestor = document.getElementById('ancestor'); 25 ancestor = document.getElementById('ancestor');
26 child = document.getElementById('child'); 26 child = document.getElementById('child');
27 27
28 inheritanceTest("start");
29 inheritanceTest("end");
30 inheritanceTest("left");
31 inheritanceTest("right");
32 inheritanceTest("center");
33 inheritanceTest("justify");
34 inheritanceTest("auto"); 28 inheritanceTest("auto");
29 inheritanceTest("none");
30 inheritanceTest("inter-word");
31 inheritanceTest("distribute");
35 32
36 ownValueTest("start", "end"); 33 ownValueTest("inter-word", "none");
37 ownValueTest("left", "right"); 34 ownValueTest("inter-word", "distribute");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698