5 -webkit-app-region: drag;
9 -webkit-app-region: no-drag;
13 transform: scale(
0.5,
0.5);
22 background-color: green;
30 background-color: blue;
35 <script src=
"../../resources/js-test.js"></script>
37 description("This tests that transformed annotated regions have the correct bounds.");
38 function getBoundsFromClientRectList(rects
) {
39 if (rects
&& rects
.length
== 1)
40 return rects
[0].left
+ "," + rects
[0].top
+ "+" + rects
[0].width
+ "x" + rects
[0].height
;
44 function draggableRegions() {
45 return getBoundsFromClientRectList(window
.internals
.draggableRegions(document
));
48 function nonDraggableRegions() {
49 return getBoundsFromClientRectList(window
.internals
.nonDraggableRegions(document
));
52 function startTest() {
53 shouldBe("draggableRegions()", "''");
54 shouldBe("nonDraggableRegions()", "''");
56 draggable
.classList
.add("drag");
57 shouldBe("draggableRegions()", "'20,10+100x60'");
58 shouldBe("nonDraggableRegions()", "''");
60 draggable
.classList
.add('transform');
61 shouldBe("draggableRegions()", "'45,25+50x30'");
62 shouldBe("nonDraggableRegions()", "''");
64 nondraggable
.classList
.add('nodrag');
65 shouldBe("draggableRegions()", "'45,25+50x30'");
66 shouldBe("nonDraggableRegions()", "'45,25+30x10'");
68 draggable
.classList
.remove('transform');
69 shouldBe("draggableRegions()", "'20,10+100x60'");
70 shouldBe("nonDraggableRegions()", "'20,10+60x20'");
75 window
.jsTestIsAsync
= true;
76 window
.onload
= startTest
;
81 <div id=
"nondraggable"></div>
83 <p id=
"description"></p>
84 <div id=
"console"></div>