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

Unified Diff: chrome/test/data/extensions/api_test/tabs/basics/move.html

Issue 5018002: Fixes a crash when entering a negative index with chrome.tabs.move .... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years, 1 month 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/api_test/tabs/basics/move.html
===================================================================
--- chrome/test/data/extensions/api_test/tabs/basics/move.html (revision 65777)
+++ chrome/test/data/extensions/api_test/tabs/basics/move.html (working copy)
@@ -69,6 +69,16 @@
}));
}));
}));
+
+ // Check that the browser doesn't segfault on a negative index
Aaron Boodman 2010/11/16 20:21:28 Nit: add a period to the end of this sentence. Als
+ chrome.tabs.getAllInWindow(firstWindowId, pass(function(tabs) {
+ lastTab = tabs.pop()
+ try{
Aaron Boodman 2010/11/16 20:21:28 Nit: spaces before "{": http://google-styleguide.g
+ chrome.tabs.move(lastTab.id, {'windowId': firstWindowId, 'index': -1});
+ }
+ catch(err){
+ }
Aaron Boodman 2010/11/16 20:21:28 Add a comment inside the catch block like: // No
+ }));
},
function remove() {

Powered by Google App Engine
This is Rietveld 408576698