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.
5 // out/Debug/browser_tests \
6 // --gtest_filter=ExtensionWebUITest.SanityCheckAvailableAPIs
8 // There should be a limited number of chrome.* APIs available to webui. Sanity
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.
25 var actual = Object.keys(chrome).sort();
27 var isEqual = expected.length == actual.length;
28 for (var i = 0; i < expected.length && isEqual; i++) {
29 if (expected[i] != actual[i])
34 console.error(window.location.href + ': ' +
35 'Expected: ' + JSON.stringify(expected) + ', ' +
36 'Actual: ' + JSON.stringify(actual));
38 domAutomationController.send(isEqual);