OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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. |
| 4 |
| 5 // out/Debug/browser_tests \ |
| 6 // --gtest_filter=ExtensionWebUITest.SanityCheckAvailableAPIs |
| 7 |
| 8 // There should be a limited number of chrome.* APIs available to webui. Sanity |
| 9 // check them here. |
| 10 // |
| 11 // NOTE: Of course, update this list if/when more APIs are made available. |
| 12 // NOTE2: Apologies to other people putting things on chrome which aren't |
| 13 // related and whose tests fail. |
| 14 |
| 15 var expected = [ |
| 16 'csi', |
| 17 'getVariableValue', |
| 18 'loadTimes', |
| 19 'runtime', |
| 20 'send', |
| 21 'test', |
| 22 ]; |
| 23 var actual = Object.keys(chrome).sort(); |
| 24 |
| 25 if (!chrome.test.checkDeepEq(expected, actual)) { |
| 26 console.error('Expected: ' + JSON.stringify(expected) + ', ' + |
| 27 'Actual: ' + JSON.stringify(actual)); |
| 28 domAutomationController.send(false); |
| 29 } else { |
| 30 domAutomationController.send(true); |
| 31 } |
OLD | NEW |