OLD | NEW |
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 chrome.app.runtime.onLaunched.addListener(function() { | 5 chrome.app.runtime.onLaunched.addListener(function() { |
| 6 chrome.test.sendMessage('Launched'); |
| 7 |
6 var win1; | 8 var win1; |
7 chrome.app.window.create('empty.html', | 9 chrome.app.window.create('empty.html', |
8 { id: 'test', | 10 { id: 'test', |
9 left: 113, top: 117, width: 314, height: 271, | 11 left: 113, top: 117, width: 314, height: 271, |
10 frame: 'none' }, function(win) { | 12 frame: 'none' }, function(win) { |
11 win1 = win; | 13 win1 = win; |
12 | 14 |
13 var bounds = win.getBounds(); | 15 var bounds = win.getBounds(); |
14 | 16 |
15 // TODO(jeremya): convert to use getBounds() once | 17 // TODO(jeremya): convert to use getBounds() once |
(...skipping 18 matching lines...) Expand all Loading... |
34 chrome.test.assertEq(137, bounds.left); | 36 chrome.test.assertEq(137, bounds.left); |
35 chrome.test.assertEq(143, bounds.top); | 37 chrome.test.assertEq(143, bounds.top); |
36 chrome.test.assertEq(203, bounds.width); | 38 chrome.test.assertEq(203, bounds.width); |
37 chrome.test.assertEq(187, bounds.height); | 39 chrome.test.assertEq(187, bounds.height); |
38 chrome.test.sendMessage('Done2'); | 40 chrome.test.sendMessage('Done2'); |
39 win.close() | 41 win.close() |
40 window.close(); | 42 window.close(); |
41 }); | 43 }); |
42 }); | 44 }); |
43 }); | 45 }); |
OLD | NEW |