Commit 04f14479 authored by Dan Beam's avatar Dan Beam

Update compiler to pick up new externs.

R=tbreisacher@chromium.org
BUG=none
TEST=http://build.chromium.org/p/chromium.fyi/builders/Closure%20Compilation%20Linux/

Review URL: https://codereview.chromium.org/695013002

Cr-Commit-Position: refs/heads/master@{#302455}
parent 0a05c08f
...@@ -7,15 +7,6 @@ ...@@ -7,15 +7,6 @@
* @externs * @externs
*/ */
// TODO: Remove the ChromeKeyboardEvent additions when they are included
// in third_party/closure_compiler/externs/chrome_extensions.js.
/** @type {string} */
ChromeKeyboardEvent.prototype.code;
/** @type {boolean|undefined} */
ChromeKeyboardEvent.prototype.capsLock;
/** /**
* @type {Object} * @type {Object}
*/ */
......
...@@ -2330,7 +2330,7 @@ chrome.bookmarks = {}; ...@@ -2330,7 +2330,7 @@ chrome.bookmarks = {};
/** /**
* @typedef {?{ * @typedef {?{
* pareintId: (string|undefined), * parentId: (string|undefined),
* index: (number|undefined), * index: (number|undefined),
* url: (string|undefined), * url: (string|undefined),
* title: (string|undefined) * title: (string|undefined)
...@@ -2340,6 +2340,17 @@ chrome.bookmarks = {}; ...@@ -2340,6 +2340,17 @@ chrome.bookmarks = {};
chrome.bookmarks.CreateDetails; chrome.bookmarks.CreateDetails;
/**
* @typedef {?{
* query: (string|undefined),
* url: (string|undefined),
* title: (string|undefined)
* }}
* @see https://developer.chrome.com/extensions/bookmarks#method-search
*/
chrome.bookmarks.SearchDetails;
/** /**
* @param {(string|Array.<string>)} idOrIdList * @param {(string|Array.<string>)} idOrIdList
* @param {function(Array.<BookmarkTreeNode>): void} callback The * @param {function(Array.<BookmarkTreeNode>): void} callback The
...@@ -2385,7 +2396,7 @@ chrome.bookmarks.getSubTree = function(id, callback) {}; ...@@ -2385,7 +2396,7 @@ chrome.bookmarks.getSubTree = function(id, callback) {};
/** /**
* @param {string} query * @param {string|!chrome.bookmarks.SearchDetails} query
* @param {function(Array.<BookmarkTreeNode>): void} callback * @param {function(Array.<BookmarkTreeNode>): void} callback
* @return {Array.<BookmarkTreeNode>} * @return {Array.<BookmarkTreeNode>}
*/ */
...@@ -3198,6 +3209,8 @@ chrome.history.onVisited; ...@@ -3198,6 +3209,8 @@ chrome.history.onVisited;
/** /**
* @const * @const
* @see http://developer.chrome.com/apps/identity.html * @see http://developer.chrome.com/apps/identity.html
* TODO: replace TokenDetails, InvalidTokenDetails and
* WebAuthFlowDetails with Object.
*/ */
chrome.identity = {}; chrome.identity = {};
...@@ -3238,6 +3251,10 @@ chrome.identity.launchWebAuthFlow = function(details, callback) {}; ...@@ -3238,6 +3251,10 @@ chrome.identity.launchWebAuthFlow = function(details, callback) {};
chrome.identity.WebAuthFlowDetails; chrome.identity.WebAuthFlowDetails;
/** @param {!function(!Object=):void} callback */
chrome.identity.getProfileUserInfo = function(callback) {};
/** @type {!ChromeEvent} */ /** @type {!ChromeEvent} */
chrome.identity.onSignInChanged; chrome.identity.onSignInChanged;
...@@ -5262,22 +5279,38 @@ ChromeKeyboardEvent.prototype.type; ...@@ -5262,22 +5279,38 @@ ChromeKeyboardEvent.prototype.type;
ChromeKeyboardEvent.prototype.requestId; ChromeKeyboardEvent.prototype.requestId;
/** @type {string|undefined} */
ChromeKeyboardEvent.prototype.extensionId;
/** @type {string} */ /** @type {string} */
ChromeKeyboardEvent.prototype.key; ChromeKeyboardEvent.prototype.key;
/** @type {boolean} */ /** @type {string} */
ChromeKeyboardEvent.prototype.code;
/** @type {number|undefined} */
ChromeKeyboardEvent.prototype.keyCode;
/** @type {boolean|undefined} */
ChromeKeyboardEvent.prototype.altKey; ChromeKeyboardEvent.prototype.altKey;
/** @type {boolean} */ /** @type {boolean|undefined} */
ChromeKeyboardEvent.prototype.ctrlKey; ChromeKeyboardEvent.prototype.ctrlKey;
/** @type {boolean} */ /** @type {boolean|undefined} */
ChromeKeyboardEvent.prototype.shiftKey; ChromeKeyboardEvent.prototype.shiftKey;
/** @type {boolean|undefined} */
ChromeKeyboardEvent.prototype.capsLock;
/** /**
* @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext * @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext
...@@ -6046,14 +6079,6 @@ chrome.notifications.NotificationItem; ...@@ -6046,14 +6079,6 @@ chrome.notifications.NotificationItem;
chrome.notifications.NotificationOptions; chrome.notifications.NotificationOptions;
/**
* @typedef {function(string): void}
* @see http://developer.chrome.com/extensions/notifications.html#method-create
* @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
*/
chrome.notifications.StringCallback;
/** /**
* @typedef {function(boolean): void} * @typedef {function(boolean): void}
* @see http://developer.chrome.com/extensions/notifications.html#method-update * @see http://developer.chrome.com/extensions/notifications.html#method-update
...@@ -6086,7 +6111,7 @@ chrome.notifications.ButtonCallback; ...@@ -6086,7 +6111,7 @@ chrome.notifications.ButtonCallback;
/** /**
* @param {string} notificationId * @param {string} notificationId
* @param {!chrome.notifications.NotificationOptions} options * @param {!chrome.notifications.NotificationOptions} options
* @param {!chrome.notifications.StringCallback} callback * @param {function(string): void} callback
* @see http://developer.chrome.com/extensions/notifications.html#method-create * @see http://developer.chrome.com/extensions/notifications.html#method-create
*/ */
chrome.notifications.create = function(notificationId, options, callback) {}; chrome.notifications.create = function(notificationId, options, callback) {};
...@@ -6118,7 +6143,7 @@ chrome.notifications.getAll = function(callback) {}; ...@@ -6118,7 +6143,7 @@ chrome.notifications.getAll = function(callback) {};
/** /**
* @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel * @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel
* @param {function(string)} callback takes 'granted' or 'denied' * @param {function(string): void} callback takes 'granted' or 'denied'
*/ */
chrome.notifications.getPermissionLevel = function(callback) {}; chrome.notifications.getPermissionLevel = function(callback) {};
...@@ -6131,7 +6156,9 @@ chrome.notifications.onClosed; ...@@ -6131,7 +6156,9 @@ chrome.notifications.onClosed;
/** /**
* @type {!chrome.notifications.ClickedEvent} * The user clicked a non-button area of the notification. Callback receives a
* notificationId.
* @type {!ChromeStringEvent}
* @see http://developer.chrome.com/extensions/notifications.html#event-onClicked * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
*/ */
chrome.notifications.onClicked; chrome.notifications.onClicked;
...@@ -6144,6 +6171,22 @@ chrome.notifications.onClicked; ...@@ -6144,6 +6171,22 @@ chrome.notifications.onClicked;
chrome.notifications.onButtonClicked; chrome.notifications.onButtonClicked;
/**
* Indicates permission level change. Callback should expect 'granted' or
* 'denied'.
* @type {!ChromeStringEvent}
* @see http://developer.chrome.com/extensions/notifications.html#event-onPermissionLevelChanged
*/
chrome.notifications.onPermissionLevelChanged;
/**
* @type {!ChromeEvent}
* @see http://developer.chrome.com/extensions/notifications.html#event-onShowSettings
*/
chrome.notifications.onShowSettings;
/** /**
* @interface * @interface
...@@ -6179,40 +6222,6 @@ chrome.notifications.ClosedEvent.prototype.hasListeners = function() {}; ...@@ -6179,40 +6222,6 @@ chrome.notifications.ClosedEvent.prototype.hasListeners = function() {};
/**
* @interface
* @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
*/
chrome.notifications.ClickedEvent = function() {};
/**
* @param {!chrome.notifications.StringCallback} callback
*/
chrome.notifications.ClickedEvent.prototype.addListener = function(callback) {};
/**
* @param {!chrome.notifications.StringCallback} callback
*/
chrome.notifications.ClickedEvent.prototype.removeListener =
function(callback) {};
/**
* @param {!chrome.notifications.StringCallback} callback
* @return {boolean}
*/
chrome.notifications.ClickedEvent.prototype.hasListener = function(callback) {};
/**
* @return {boolean}
*/
chrome.notifications.ClickedEvent.prototype.hasListeners = function() {};
/** /**
* @interface * @interface
* @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
......
...@@ -207,21 +207,6 @@ public class ChromePassTest extends CompilerTestCase { ...@@ -207,21 +207,6 @@ public class ChromePassTest extends CompilerTestCase {
"});\n"); "});\n");
} }
public void testCrDefineDoesNothingWithExportedNotAName() throws Exception {
test(
"cr.define('namespace', function() {\n" +
" return {\n" +
" a: 42\n" +
" };\n" +
"});\n",
"var namespace = namespace || {};\n" +
"cr.define('namespace', function() {\n" +
" return {\n" +
" a: 42\n" +
" };\n" +
"});\n");
}
public void testCrDefineChangesReferenceToExportedFunction() throws Exception { public void testCrDefineChangesReferenceToExportedFunction() throws Exception {
test( test(
"cr.define('namespace', function() {\n" + "cr.define('namespace', function() {\n" +
......
...@@ -144,7 +144,7 @@ cr.define('cr.ui', function() { ...@@ -144,7 +144,7 @@ cr.define('cr.ui', function() {
* @private * @private
*/ */
onFocusin_: function(e) { onFocusin_: function(e) {
if (this.boundary_.contains(e.target)) if (this.boundary_.contains(assertInstanceof(e.target, Node)))
this.activeIndex = this.items.indexOf(e.target); this.activeIndex = this.items.indexOf(e.target);
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment