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

Side by Side Diff: chrome/test/data/extensions/api_test/systeminfo/display/test_display_api.js

Issue 11882009: Multi-monitor extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 179043. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/extensions/api_test/systeminfo/display/manifest.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // systeminfo.memory api test 5 // systeminfo.memory api test
6 // browser_tests --gtest_filter=SystemInfoMemoryApiTest.* 6 // browser_tests --gtest_filter=SystemInfoMemoryApiTest.*
7 7
8 chrome.systemInfo = chrome.experimental.systemInfo;
9
10 chrome.test.runTests([ 8 chrome.test.runTests([
11 function testGet() { 9 function testGet() {
12 for(var i = 0; i < 10; ++i) { 10 for(var i = 0; i < 10; ++i) {
13 chrome.systemInfo.display.get(chrome.test.callbackPass(function(result) { 11 chrome.systemInfo.display.getDisplayInfo(
14 chrome.test.assertEq(2, result.length); 12 chrome.test.callbackPass(function(result) {
15 for (var i = 0; i < result.length; i++) { 13 chrome.test.assertEq(2, result.length);
16 var info = result[i]; 14 for (var i = 0; i < result.length; i++) {
17 chrome.test.assertEq('DISPLAY', info.id); 15 var info = result[i];
18 chrome.test.assertEq(i, info.index); 16 chrome.test.assertEq('DISPLAY', info.id);
19 chrome.test.assertEq(i == 0 ? true : false, info.isPrimary); 17 chrome.test.assertEq('DISPLAY NAME', info.name);
20 chrome.test.assertEq(0, info.availTop); 18 chrome.test.assertEq(i == 0 ? true : false, info.isPrimary);
21 chrome.test.assertEq(0, info.availLeft); 19 chrome.test.assertEq(i == 0 ? true : false, info.isInternal);
22 chrome.test.assertEq(960, info.availWidth); 20 chrome.test.assertEq(true, info.isEnabled);
23 chrome.test.assertEq(720, info.availHeight); 21 chrome.test.assertEq(96.0, info.dpiX);
24 chrome.test.assertEq(32, info.colorDepth); 22 chrome.test.assertEq(96.0, info.dpiY);
25 chrome.test.assertEq(32, info.pixelDepth); 23 chrome.test.assertEq(0, info.bounds.left);
26 chrome.test.assertEq(1280, info.height); 24 chrome.test.assertEq(0, info.bounds.top);
27 chrome.test.assertEq(720, info.width); 25 chrome.test.assertEq(1280, info.bounds.width);
28 chrome.test.assertEq(0, info.absoluteTopOffset); 26 chrome.test.assertEq(720, info.bounds.height);
29 chrome.test.assertEq(1280, info.absoluteLeftOffset); 27 chrome.test.assertEq(0, info.workArea.left);
30 chrome.test.assertEq(96, info.dpiX); 28 chrome.test.assertEq(0, info.workArea.top);
31 chrome.test.assertEq(96, info.dpiY); 29 chrome.test.assertEq(960, info.workArea.width);
30 chrome.test.assertEq(720, info.workArea.height);
32 } 31 }
33 })); 32 }));
34 } 33 }
35 } 34 }
36 ]); 35 ]);
37 36
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/systeminfo/display/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698