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

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, 5 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('text-align- last').cssText", "'" + a_value + "'"); 3 shouldBe("window.getComputedStyle(ancestor).getPropertyCSSValue('text-justif y').cssText", "'" + a_value + "'");
4 shouldBe("window.getComputedStyle(child).getPropertyCSSValue('text-align-las t').cssText", "'" + c_value + "'"); 4 shouldBe("window.getComputedStyle(child).getPropertyCSSValue('text-justify') .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.textAlignLast = a_value; 11 ancestor.style.textJustify = a_value;
12 child.style.textAlignLast = c_value; 12 child.style.textJustify = 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.textAlignLast = a_value; 19 ancestor.style.textJustify = 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 text-align-last is properly inhe rited to the child."); 23 description("This test checks that the value of text-justify is properly inherit ed 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");
Julien - ping for review 2013/07/15 22:05:47 Do we really need separate tests for inherited vs
35 32
36 ownValueTest("start", "end"); 33 ownValueTest("inter-word", "distribute");
37 ownValueTest("left", "right"); 34 ownValueTest("none", "distribute");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698