1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // system.display api test
6 // extensions_browsertests --gtest_filter=SystemDisplayApiTest.*
10 for(var i
= 0; i
< 10; ++i
) {
11 chrome
.system
.display
.getInfo(
12 chrome
.test
.callbackPass(function(result
) {
13 chrome
.test
.assertEq(4, result
.length
);
14 for (var i
= 0; i
< result
.length
; i
++) {
16 chrome
.test
.assertEq('' + i
, info
.id
);
17 chrome
.test
.assertEq('DISPLAY NAME FOR ' + i
, info
.name
);
18 chrome
.test
.assertEq(i
== 0 ? true : false, info
.isPrimary
);
19 chrome
.test
.assertEq(i
== 0 ? true : false, info
.isInternal
);
21 chrome
.test
.assertEq('0', info
.mirroringSourceId
);
23 chrome
.test
.assertEq('', info
.mirroringSourceId
);
25 chrome
.test
.assertEq(true, info
.isEnabled
);
26 chrome
.test
.assertEq(90 * i
, info
.rotation
);
27 chrome
.test
.assertEq(96.0, info
.dpiX
);
28 chrome
.test
.assertEq(96.0, info
.dpiY
);
29 chrome
.test
.assertEq(0, info
.bounds
.left
);
30 chrome
.test
.assertEq(0, info
.bounds
.top
);
31 chrome
.test
.assertEq(1280, info
.bounds
.width
);
32 chrome
.test
.assertEq(720, info
.bounds
.height
);
34 chrome
.test
.assertEq(20, info
.overscan
.left
);
35 chrome
.test
.assertEq(40, info
.overscan
.top
);
36 chrome
.test
.assertEq(60, info
.overscan
.right
);
37 chrome
.test
.assertEq(80, info
.overscan
.bottom
);
39 chrome
.test
.assertEq(0, info
.overscan
.left
);
40 chrome
.test
.assertEq(0, info
.overscan
.top
);
41 chrome
.test
.assertEq(0, info
.overscan
.right
);
42 chrome
.test
.assertEq(0, info
.overscan
.bottom
);
44 chrome
.test
.assertEq(0, info
.workArea
.left
);
45 chrome
.test
.assertEq(0, info
.workArea
.top
);
46 chrome
.test
.assertEq(960, info
.workArea
.width
);
47 chrome
.test
.assertEq(720, info
.workArea
.height
);