| Index: chrome/test/data/extensions/api_test/tabs/basics/move.html
|
| diff --git a/chrome/test/data/extensions/api_test/tabs/basics/move.html b/chrome/test/data/extensions/api_test/tabs/basics/move.html
|
| index 9df94f4ae7e74c8b6192e24fac1ea07835ed8bbb..55eb71b1e23cb8c82e7936efa0f8b1d6d7a150d4 100644
|
| --- a/chrome/test/data/extensions/api_test/tabs/basics/move.html
|
| +++ b/chrome/test/data/extensions/api_test/tabs/basics/move.html
|
| @@ -80,6 +80,22 @@ chrome.test.runTests([
|
| assertEq("chrome://newtab/", tabs[1].url);
|
| }));
|
| }));
|
| + },
|
| +
|
| + // Make sure we don't crash when the index is out of range.
|
| + function moveToInvalidTab() {
|
| + var error_msg = "Invalid value for argument 2. Property 'index': " +
|
| + "Value must not be less than 0.";
|
| + try {
|
| + chrome.tabs.move(moveTabIds['b'], {index: -1}, function(tab) {
|
| + chrome.test.fail("Moved a tab to an invalid index");
|
| + });
|
| + } catch (e) {
|
| + assertEq(error_msg, e.message);
|
| + }
|
| + chrome.tabs.move(moveTabIds['b'], {index: 10000}, pass(function(tabB) {
|
| + assertEq(1, tabB.index);
|
| + }));
|
| }
|
| ]);
|
| </script>
|
|
|