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 var assertEq = chrome.test.assertEq; | 5 var assertEq = chrome.test.assertEq; |
6 var assertTrue = chrome.test.assertTrue; | 6 var assertTrue = chrome.test.assertTrue; |
7 var fail = chrome.test.fail; | 7 var fail = chrome.test.fail; |
8 var succeed = chrome.test.succeed; | 8 var succeed = chrome.test.succeed; |
9 | 9 |
10 function assertThrowsError(method, opt_expectedError) { | 10 function assertThrowsError(method, opt_expectedError) { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 function testLegacyApis() { | 159 function testLegacyApis() { |
160 if (chrome.app) { | 160 if (chrome.app) { |
161 assertEq('undefined', typeof(chrome.app.getIsInstalled)); | 161 assertEq('undefined', typeof(chrome.app.getIsInstalled)); |
162 assertEq('undefined', typeof(chrome.app.install)); | 162 assertEq('undefined', typeof(chrome.app.install)); |
163 assertEq('undefined', typeof(chrome.app.isInstalled)); | 163 assertEq('undefined', typeof(chrome.app.isInstalled)); |
164 assertEq('undefined', typeof(chrome.app.getDetails)); | 164 assertEq('undefined', typeof(chrome.app.getDetails)); |
165 assertEq('undefined', typeof(chrome.app.getDetailsForFrame)); | 165 assertEq('undefined', typeof(chrome.app.getDetailsForFrame)); |
166 assertEq('undefined', typeof(chrome.app.runningState)); | 166 assertEq('undefined', typeof(chrome.app.runningState)); |
167 } | 167 } |
168 assertEq('undefined', typeof(chrome.appNotifications)); | |
169 assertEq('undefined', typeof(chrome.extension)); | 168 assertEq('undefined', typeof(chrome.extension)); |
170 succeed(); | 169 succeed(); |
171 }, | 170 }, |
172 | 171 |
173 function testExtensionApis() { | 172 function testExtensionApis() { |
174 assertEq('undefined', typeof(chrome.tabs)); | 173 assertEq('undefined', typeof(chrome.tabs)); |
175 assertEq('undefined', typeof(chrome.windows)); | 174 assertEq('undefined', typeof(chrome.windows)); |
176 succeed(); | 175 succeed(); |
177 } | 176 } |
178 ]); | 177 ]); |
OLD | NEW |