Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5752)

Unified Diff: chrome/test/data/extensions/platform_apps/context_menu/test.js

Issue 10080017: Switch platform apps from a declarative launch container to handling an onLaunched event. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove debug logging code Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/platform_apps/context_menu/test.js
diff --git a/chrome/test/data/extensions/platform_apps/context_menu/test.js b/chrome/test/data/extensions/platform_apps/context_menu/test.js
index 09af18a9b224336a18251540774f2f12ee780ecb..e05e6898238f851ce9fc71522f4fd91981a9bfdd 100644
--- a/chrome/test/data/extensions/platform_apps/context_menu/test.js
+++ b/chrome/test/data/extensions/platform_apps/context_menu/test.js
@@ -1,15 +1,16 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
-function onclick(info) {
-}
-
-window.onload = function() {
- chrome.contextMenus.create({"title":"Extension Item 1",
- "onclick": onclick}, function() {
- if (!chrome.extension.lastError) {
- chrome.test.sendMessage("created item");
- }
- });
-};
+chrome.experimental.app.onLaunched.addListener(function() {
+ chrome.contextMenus.create({
+ title: 'Extension Item 1',
+ onclick: function() {}
+ },
+ function() {
+ chrome.windows.create({
+ url: 'main.html',
+ type: 'shell'
+ });
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698