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

Unified Diff: LayoutTests/fast/dom/geometry-interfaces-dom-point.html

Issue 404803002: Implement DOMPoint of geometry interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed comments Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/geometry-interfaces-dom-point.html
diff --git a/LayoutTests/fast/dom/geometry-interfaces-dom-point.html b/LayoutTests/fast/dom/geometry-interfaces-dom-point.html
new file mode 100644
index 0000000000000000000000000000000000000000..f11535f1d10ad33ab937cb97e3b06ec8ccc1e0d8
--- /dev/null
+++ b/LayoutTests/fast/dom/geometry-interfaces-dom-point.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Geometry Interfaces: DOMPoint</title>
haraken 2014/07/21 14:03:55 Nit: No indentation is needed. If you want to inde
zino 2014/07/21 15:12:42 Done.
+ <script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+
+ debug("# DOMPoint(2, 3)");
haraken 2014/07/21 14:03:55 Ditto.
zino 2014/07/21 15:12:42 Done.
+ var point = new DOMPoint(2, 3);
+ shouldBe("point.x", "2");
+ shouldBe("point.y", "3");
+ shouldBe("point.z", "0");
+ shouldBe("point.w", "1");
+ debug("");
+
+ debug("# DOMPoint(5, 7, 9)");
+ point = new DOMPoint(5, 7, 9);
+ shouldBe("point.x", "5");
+ shouldBe("point.y", "7");
+ shouldBe("point.z", "9");
+ shouldBe("point.w", "1");
+ debug("");
+
+ debug("# DOMPoint(8, 2, 1, 6)");
+ point = new DOMPoint(5, 7, 9);
+ point = new DOMPoint(8, 2, 1, 6);
+ shouldBe("point.x", "8");
+ shouldBe("point.y", "2");
+ shouldBe("point.z", "1");
+ shouldBe("point.w", "6");
+ debug("");
+
+ debug("# DOMPoint({ x : 2 })");
+ point = new DOMPoint({ x : 2 });
+ shouldBe("point.x", "2");
+ shouldBe("point.y", "0");
+ shouldBe("point.z", "0");
+ shouldBe("point.w", "1");
+ debug("");
+
+ debug("# DOMPoint({ y : 2 })");
+ point = new DOMPoint({ y : 2 });
+ shouldBe("point.x", "0");
+ shouldBe("point.y", "2");
+ shouldBe("point.z", "0");
+ shouldBe("point.w", "1");
+ debug("");
+
+ debug("# DOMPoint({ z : 2 })");
+ point = new DOMPoint({ z : 2 });
+ shouldBe("point.x", "0");
+ shouldBe("point.y", "0");
+ shouldBe("point.z", "2");
+ shouldBe("point.w", "1");
+ debug("");
+
+ debug("# DOMPoint({ w : 2 })");
+ point = new DOMPoint({ w : 2 });
+ shouldBe("point.x", "0");
+ shouldBe("point.y", "0");
+ shouldBe("point.z", "0");
+ shouldBe("point.w", "2");
+ debug("");
+
+ debug("# DOMPoint({ x : 2, y : 3, z : 4, w : 5 })");
+ point = new DOMPoint({ x : 2, y : 3, z : 4, w : 5 });
+ shouldBe("point.x", "2");
+ shouldBe("point.y", "3");
+ shouldBe("point.z", "4");
+ shouldBe("point.w", "5");
+ debug("");
+
+ debug("# DOMPoint()");
+ point = new DOMPoint();
+ shouldBe("point.x", "0");
+ shouldBe("point.y", "0");
+ shouldBe("point.z", "0");
+ shouldBe("point.w", "1");
+ debug("");
+
+ debug("# DOMPoint setter");
+ point.x = 10;
+ shouldBe("point.x", "10");
+ point.y = 20;
+ shouldBe("point.y", "20");
+ point.z = 30;
+ shouldBe("point.z", "30");
+ point.w = 40;
+ shouldBe("point.w", "40");
+ debug("");
+
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/geometry-interfaces-dom-point-expected.txt » ('j') | Source/core/dom/DOMPoint.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698