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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-rect.html

Issue 2611703002: The DOMRectReadOnly interface requires serializer. (Closed)
Patch Set: DOMRectReadOnly interface requires serializer. 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 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 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 3
4 <title>Geometry Interfaces: DOMRect</title> 4 <title>Geometry Interfaces: DOMRect</title>
5 <link rel="help" href="https://drafts.fxtf.org/geometry/#domrect"> 5 <link rel="help" href="https://drafts.fxtf.org/geometry/#domrect">
6 <script src="../../resources/testharness.js"></script> 6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script> 7 <script src="../../resources/testharnessreport.js"></script>
8 <script src="./resources/geometry-interfaces-test-helpers.js"></script> 8 <script src="./resources/geometry-interfaces-test-helpers.js"></script>
9 <script> 9 <script>
10 'use strict'; 10 'use strict';
(...skipping 23 matching lines...) Expand all
34 assert_dom_rect_equals(rect, [10, 20, 80, 50, 20, 90, 70, 10]); 34 assert_dom_rect_equals(rect, [10, 20, 80, 50, 20, 90, 70, 10]);
35 }, 'DOMRect constructor with x, y, width, height parameters'); 35 }, 'DOMRect constructor with x, y, width, height parameters');
36 36
37 test(() => { 37 test(() => {
38 var rect = new DOMRect(10, 20, -80, -50); 38 var rect = new DOMRect(10, 20, -80, -50);
39 assert_dom_rect_equals(rect, [10, 20, -80, -50, -30, 10, 20, -70]); 39 assert_dom_rect_equals(rect, [10, 20, -80, -50, -30, 10, 20, -70]);
40 }, 'DOMRect constructor with negative width and height parameters'); 40 }, 'DOMRect constructor with negative width and height parameters');
41 41
42 test(() => { 42 test(() => {
43 var rect = new DOMRect(10, 20, 80, 50); 43 var rect = new DOMRect(10, 20, 80, 50);
44 assert_object_equals(rect.toJSON(), {x: 10, y: 20, width: 80, height: 50, top: 20, right: 90, bottom: 70, left: 10});
45 }, 'DOMRect toJSON');
46
47 test(() => {
48 var rect = new DOMRect(10, 20, 80, 50);
44 rect.x = 30; 49 rect.x = 30;
45 assert_dom_rect_equals(rect, [30, 20, 80, 50, 20, 110, 70, 30]); 50 assert_dom_rect_equals(rect, [30, 20, 80, 50, 20, 110, 70, 30]);
46 rect.y = -10; 51 rect.y = -10;
47 assert_dom_rect_equals(rect, [30, -10, 80, 50, -10, 110, 40, 30]); 52 assert_dom_rect_equals(rect, [30, -10, 80, 50, -10, 110, 40, 30]);
48 rect.width = 20; 53 rect.width = 20;
49 assert_dom_rect_equals(rect, [30, -10, 20, 50, -10, 50, 40, 30]); 54 assert_dom_rect_equals(rect, [30, -10, 20, 50, -10, 50, 40, 30]);
50 rect.height = 40; 55 rect.height = 40;
51 assert_dom_rect_equals(rect, [30, -10, 20, 40, -10, 50, 30, 30]); 56 assert_dom_rect_equals(rect, [30, -10, 20, 40, -10, 50, 30, 30]);
52 }, 'DOMRect setter'); 57 }, 'DOMRect setter');
53 58
(...skipping 23 matching lines...) Expand all
77 }, 'DOMRectReadOnly constructor with x, y, width, height parameters'); 82 }, 'DOMRectReadOnly constructor with x, y, width, height parameters');
78 83
79 test(() => { 84 test(() => {
80 var rect = new DOMRectReadOnly(10, 20, 80, 50); 85 var rect = new DOMRectReadOnly(10, 20, 80, 50);
81 assert_readonly(rect, 'x'); 86 assert_readonly(rect, 'x');
82 assert_readonly(rect, 'y'); 87 assert_readonly(rect, 'y');
83 assert_readonly(rect, 'width'); 88 assert_readonly(rect, 'width');
84 assert_readonly(rect, 'height'); 89 assert_readonly(rect, 'height');
85 }, 'DOMRectReadOnly readonly test'); 90 }, 'DOMRectReadOnly readonly test');
86 91
92 test(() => {
93 var rect = new DOMRectReadOnly(10, 20, 80, 50);
94 assert_object_equals(rect.toJSON(), {x: 10, y: 20, width: 80, height: 50, top: 20, right: 90, bottom: 70, left: 10});
95 }, 'DOMRectReadOnly toJSON');
96
87 </script> 97 </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