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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/geometry-interface-dom-quad.html

Issue 2680023003: [GeometryInterface] add getBounds function in DOMQaud. (Closed)
Patch Set: caching 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="./resources/geometry-interfaces-test-helpers.js"></script> 4 <script src="./resources/geometry-interfaces-test-helpers.js"></script>
5 <script> 5 <script>
6 test(() => { 6 test(() => {
7 var p1 = new DOMPoint(0, 1, 3, 4); 7 var p1 = new DOMPoint(0, 1, 3, 4);
8 var p2 = new DOMPoint(5, 6, 7, 8); 8 var p2 = new DOMPoint(5, 6, 7, 8);
9 var p3 = new DOMPoint(9, 10, 11, 12); 9 var p3 = new DOMPoint(9, 10, 11, 12);
10 var p4 = new DOMPoint(13, 14, 15, 16); 10 var p4 = new DOMPoint(13, 14, 15, 16);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 var expect_p2 = new DOMPoint(0, 0, 0, 1); 59 var expect_p2 = new DOMPoint(0, 0, 0, 1);
60 var expect_p3 = new DOMPoint(0, 0, 0, 1); 60 var expect_p3 = new DOMPoint(0, 0, 0, 1);
61 var expect_p4 = new DOMPoint(0, 0, 0, 1); 61 var expect_p4 = new DOMPoint(0, 0, 0, 1);
62 var quad = DOMQuad.fromQuad({}); 62 var quad = DOMQuad.fromQuad({});
63 assert_dom_point_equals(quad.p1, expect_p1, "p1"); 63 assert_dom_point_equals(quad.p1, expect_p1, "p1");
64 assert_dom_point_equals(quad.p2, expect_p2, "p2"); 64 assert_dom_point_equals(quad.p2, expect_p2, "p2");
65 assert_dom_point_equals(quad.p3, expect_p3, "p3"); 65 assert_dom_point_equals(quad.p3, expect_p3, "p3");
66 assert_dom_point_equals(quad.p4, expect_p4, "p4"); 66 assert_dom_point_equals(quad.p4, expect_p4, "p4");
67 }, "DOMQuad() fromQuad - parameter of fromQuad function does not have any point. "); 67 }, "DOMQuad() fromQuad - parameter of fromQuad function does not have any point. ");
68 68
69 test(() => {
70 var p1 = new DOMPoint(40, 25, 0, 1);
71 var p2 = new DOMPoint(180, 8, 0, 1);
72 var p3 = new DOMPoint(210, 150, 0, 1);
73 var p4 = new DOMPoint(10, 180, 0, 1);
74 var expect_rect = new DOMRect(10, 8, 200, 172);
75 var quad = new DOMQuad(p1, p2, p3, p4);
76 assert_dom_rect_equals(quad.getBounds(), expect_rect);
77 }, "DOMQuad() getBounds");
78
69 </script> 79 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698