| Index: chrome/test/data/extensions/webui/sanity_check_available_apis.js
|
| diff --git a/chrome/test/data/extensions/webui/sanity_check_available_apis.js b/chrome/test/data/extensions/webui/sanity_check_available_apis.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a57b832b1e17cfebfb8afb63117e67dc3eee6eac
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/webui/sanity_check_available_apis.js
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// out/Debug/browser_tests \
|
| +// --gtest_filter=ExtensionWebUITest.SanityCheckAvailableAPIs
|
| +
|
| +// There should be a limited number of chrome.* APIs available to webui. Sanity
|
| +// check them here.
|
| +//
|
| +// NOTE: Of course, update this list if/when more APIs are made available.
|
| +// NOTE2: Apologies to other people putting things on chrome which aren't
|
| +// related and whose tests fail.
|
| +
|
| +var expected = [
|
| + 'csi',
|
| + 'getVariableValue',
|
| + 'loadTimes',
|
| + 'runtime',
|
| + 'send',
|
| + 'test',
|
| +];
|
| +var actual = Object.keys(chrome).sort();
|
| +
|
| +if (!chrome.test.checkDeepEq(expected, actual)) {
|
| + console.error('Expected: ' + JSON.stringify(expected) + ', ' +
|
| + 'Actual: ' + JSON.stringify(actual));
|
| + domAutomationController.send(false);
|
| +} else {
|
| + domAutomationController.send(true);
|
| +}
|
|
|