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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute.html
index 58e69f48873b5378ebf0d0a4ec665d51033a6f9c..5714490c464ad936473dcd808bb8dc57916b5ac7 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute.html
@@ -4,6 +4,44 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/cellpadding-attribute.js"></script>
+<script>
+description("HTMLTableElement cellpadding attribute test");
+
+function cellPaddingAttributeEffect(value)
+{
+ var table = document.createElement("table");
+ table.setAttribute("cellpadding", value);
+ var cell = document.createElement("td");
+ table.appendChild(cell);
+ document.body.appendChild(table);
+ var computedStyle = getComputedStyle(cell, "");
+ var result = computedStyle.paddingTop;
+ document.body.removeChild(table);
+ return result;
+}
+
+shouldBe('cellPaddingAttributeEffect("")', '"1px"');
+
+shouldBe('cellPaddingAttributeEffect("1")', '"1px"');
+shouldBe('cellPaddingAttributeEffect("2")', '"2px"');
+shouldBe('cellPaddingAttributeEffect("10")', '"10px"');
+
+shouldBe('cellPaddingAttributeEffect("0")', '"0px"');
+
+shouldBe('cellPaddingAttributeEffect("-1")', '"0px"');
+
+shouldBe('cellPaddingAttributeEffect("1x")', '"1px"');
+shouldBe('cellPaddingAttributeEffect("1.")', '"1px"');
+shouldBe('cellPaddingAttributeEffect("1.9")', '"1px"');
+shouldBe('cellPaddingAttributeEffect("2x")', '"2px"');
+shouldBe('cellPaddingAttributeEffect("2.")', '"2px"');
+shouldBe('cellPaddingAttributeEffect("2.9")', '"2px"');
+
+shouldBe('cellPaddingAttributeEffect("a")', '"0px"');
+
+var arabicIndicDigitOne = String.fromCharCode(0x661);
+shouldBe('cellPaddingAttributeEffect(arabicIndicDigitOne)', '"0px"');
+shouldBe('cellPaddingAttributeEffect("2" + arabicIndicDigitOne)', '"2px"');
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698