| Index: chrome/browser/resources/chromeos/login/apps_menu.js
|
| diff --git a/chrome/browser/resources/chromeos/login/apps_menu.js b/chrome/browser/resources/chromeos/login/apps_menu.js
|
| index d60dce3dce4ba1ffc2b633768c1316cc6aeee4f0..d16032c0be47f3dc20b261cc621de0bf18a367da 100644
|
| --- a/chrome/browser/resources/chromeos/login/apps_menu.js
|
| +++ b/chrome/browser/resources/chromeos/login/apps_menu.js
|
| @@ -76,22 +76,9 @@ cr.define('login', function() {
|
| },
|
|
|
| findAndRunAppForTesting: function(id, opt_diagnostic_mode) {
|
| - this.showMenu(true);
|
| - for (var i = 0; i < this.menu.menuItems.length; i++) {
|
| - var menuNode = this.menu.menuItems[i];
|
| - if (menuNode.appId == id) {
|
| - var activationEvent = cr.doc.createEvent('Event');
|
| - activationEvent.initEvent('activate', true, true);
|
| -
|
| - if (opt_diagnostic_mode) {
|
| - var fakeCtrlEnterEvent = cr.doc.createEvent('KeyboardEvent');
|
| - fakeCtrlEnterEvent.initKeyboardEvent('keypress', true, true, null,
|
| - 'Enter', 0,
|
| - true, false, false, false);
|
| - activationEvent.originalEvent = fakeCtrlEnterEvent;
|
| - }
|
| -
|
| - menuNode.dispatchEvent(activationEvent);
|
| + for (var i = 0; i < this.data.length; i++) {
|
| + if (this.data[i].id == id) {
|
| + this.launchApp_(this.data[i], !!opt_diagnostic_mode);
|
| break;
|
| }
|
| }
|
| @@ -134,7 +121,6 @@ cr.define('login', function() {
|
| addItem_: function(app) {
|
| var menuItem = this.menu.addMenuItem(app);
|
| menuItem.classList.add('apps-menu-item');
|
| - menuItem.appId = app.id;
|
| menuItem.addEventListener('activate', function(e) {
|
| var diagnosticMode = e.originalEvent && e.originalEvent.ctrlKey;
|
| this.launchApp_(app, diagnosticMode);
|
|
|