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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/script-tests/cellpadding-attribute.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 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
(Empty)
1 description("HTMLTableElement cellpadding attribute test");
2
3 function cellPaddingAttributeEffect(value)
4 {
5 var table = document.createElement("table");
6 table.setAttribute("cellpadding", value);
7 var cell = document.createElement("td");
8 table.appendChild(cell);
9 document.body.appendChild(table);
10 var computedStyle = getComputedStyle(cell, "");
11 var result = computedStyle.paddingTop;
12 document.body.removeChild(table);
13 return result;
14 }
15
16 shouldBe('cellPaddingAttributeEffect("")', '"1px"');
17
18 shouldBe('cellPaddingAttributeEffect("1")', '"1px"');
19 shouldBe('cellPaddingAttributeEffect("2")', '"2px"');
20 shouldBe('cellPaddingAttributeEffect("10")', '"10px"');
21
22 shouldBe('cellPaddingAttributeEffect("0")', '"0px"');
23
24 shouldBe('cellPaddingAttributeEffect("-1")', '"0px"');
25
26 shouldBe('cellPaddingAttributeEffect("1x")', '"1px"');
27 shouldBe('cellPaddingAttributeEffect("1.")', '"1px"');
28 shouldBe('cellPaddingAttributeEffect("1.9")', '"1px"');
29 shouldBe('cellPaddingAttributeEffect("2x")', '"2px"');
30 shouldBe('cellPaddingAttributeEffect("2.")', '"2px"');
31 shouldBe('cellPaddingAttributeEffect("2.9")', '"2px"');
32
33 shouldBe('cellPaddingAttributeEffect("a")', '"0px"');
34
35 var arabicIndicDigitOne = String.fromCharCode(0x661);
36 shouldBe('cellPaddingAttributeEffect(arabicIndicDigitOne)', '"0px"');
37 shouldBe('cellPaddingAttributeEffect("2" + arabicIndicDigitOne)', '"2px"');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698