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

Side by Side 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: rebase 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Geometry Interfaces: DOMPoint</title>
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
9
10 debug("# DOMPoint(2, 3)");
11 var point = new DOMPoint(2, 3);
12 shouldBe("point.x", "2");
13 shouldBe("point.y", "3");
14 shouldBe("point.z", "0");
15 shouldBe("point.w", "1");
16 debug("");
17
18 debug("# DOMPoint(5, 7, 9)");
19 point = new DOMPoint(5, 7, 9);
20 shouldBe("point.x", "5");
21 shouldBe("point.y", "7");
22 shouldBe("point.z", "9");
23 shouldBe("point.w", "1");
24 debug("");
25
26 debug("# DOMPoint(8, 2, 1, 6)");
27 point = new DOMPoint(5, 7, 9);
28 point = new DOMPoint(8, 2, 1, 6);
29 shouldBe("point.x", "8");
30 shouldBe("point.y", "2");
31 shouldBe("point.z", "1");
32 shouldBe("point.w", "6");
33 debug("");
34
35 debug("# DOMPoint({ x : 2 })");
36 point = new DOMPoint({ x : 2 });
37 shouldBe("point.x", "2");
38 shouldBe("point.y", "0");
39 shouldBe("point.z", "0");
40 shouldBe("point.w", "1");
41 debug("");
42
43 debug("# DOMPoint({ y : 2 })");
44 point = new DOMPoint({ y : 2 });
45 shouldBe("point.x", "0");
46 shouldBe("point.y", "2");
47 shouldBe("point.z", "0");
48 shouldBe("point.w", "1");
49 debug("");
50
51 debug("# DOMPoint({ z : 2 })");
52 point = new DOMPoint({ z : 2 });
53 shouldBe("point.x", "0");
54 shouldBe("point.y", "0");
55 shouldBe("point.z", "2");
56 shouldBe("point.w", "1");
57 debug("");
58
59 debug("# DOMPoint({ w : 2 })");
60 point = new DOMPoint({ w : 2 });
61 shouldBe("point.x", "0");
62 shouldBe("point.y", "0");
63 shouldBe("point.z", "0");
64 shouldBe("point.w", "2");
65 debug("");
66
67 debug("# DOMPoint({ x : 2, y : 3, z : 4, w : 5 })");
68 point = new DOMPoint({ x : 2, y : 3, z : 4, w : 5 });
69 shouldBe("point.x", "2");
70 shouldBe("point.y", "3");
71 shouldBe("point.z", "4");
72 shouldBe("point.w", "5");
73 debug("");
74
75 debug("# DOMPoint()");
76 point = new DOMPoint();
77 shouldBe("point.x", "0");
78 shouldBe("point.y", "0");
79 shouldBe("point.z", "0");
80 shouldBe("point.w", "1");
81 debug("");
82
83 debug("# DOMPoint setter");
84 point.x = 10;
85 shouldBe("point.x", "10");
86 point.y = 20;
87 shouldBe("point.y", "20");
88 point.z = 30;
89 shouldBe("point.z", "30");
90 point.w = 40;
91 shouldBe("point.w", "40");
92 debug("");
93
94 debug("# DOMPointReadOnly(10, 20, 30, 40)");
95 point = new DOMPointReadOnly(10, 20, 30, 40);
96 shouldBe("point.x", "10");
97 shouldBe("point.y", "20");
98 shouldBe("point.z", "30");
99 shouldBe("point.w", "40");
100 debug("");
101
102 debug("# DOMPointReadOnly readonly test");
103 point.x = 100;
104 shouldBe("point.x", "10");
105 point.y = 100;
106 shouldBe("point.y", "20");
107 point.z = 100;
108 shouldBe("point.z", "30");
109 point.w = 100;
110 shouldBe("point.w", "40");
111
112 </script>
113 </body>
114 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/dom/geometry-interfaces-dom-point-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698