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

Unified Diff: chrome/test/data/extensions/context_menus/long_title/test.js

Issue 3017047: Set a max limit on extension items' labels in context menus.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/context_menus/long_title/test.js
===================================================================
--- chrome/test/data/extensions/context_menus/long_title/test.js (revision 0)
+++ chrome/test/data/extensions/context_menus/long_title/test.js (revision 0)
@@ -0,0 +1,17 @@
+// Copyright (c) 2010 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.
+
+window.onload = function() {
+ // Make a 1000-character long title.
+ var title = "";
+ for (var i = 0; i < 1000; i++) {
+ title += "x";
+ }
+ chrome.test.log("creating item");
+ chrome.contextMenus.create({"title":title}, function() {
+ if (!chrome.extension.lastError) {
+ chrome.test.sendMessage("created");
+ }
+ });
+};
Property changes on: chrome/test/data/extensions/context_menus/long_title/test.js
___________________________________________________________________
Name: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698