| Index: chrome/test/data/extensions/api_test/tabs/basics/move.js
|
| diff --git a/chrome/test/data/extensions/api_test/tabs/basics/move.js b/chrome/test/data/extensions/api_test/tabs/basics/move.js
|
| index 25d119e91829fc6e98862b0df326d3fecb23ebe8..3bec82b67f62e061a3bfaebb4232d6dae5f7814a 100644
|
| --- a/chrome/test/data/extensions/api_test/tabs/basics/move.js
|
| +++ b/chrome/test/data/extensions/api_test/tabs/basics/move.js
|
| @@ -142,15 +142,25 @@ chrome.test.runTests([
|
|
|
| // 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 -1.";
|
| + var jsBindingsError =
|
| + 'Invalid value for argument 2. Property \'index\': ' +
|
| + 'Value must not be less than -1.';
|
| + var nativeBindingsError =
|
| + 'Error in invocation of tabs.move(' +
|
| + '[integer|array] tabIds, object moveProperties, ' +
|
| + 'optional function callback): Error at parameter \'moveProperties\': ' +
|
| + 'Error at property \'index\': Value must be at least -1.';
|
| + var caught = false;
|
| try {
|
| chrome.tabs.move(moveTabIds['b'], {"index": -2}, function(tab) {
|
| chrome.test.fail("Moved a tab to an invalid index");
|
| });
|
| } catch (e) {
|
| - assertEq(error_msg, e.message);
|
| + assertTrue(e.message == jsBindingsError ||
|
| + e.message == nativeBindingsError, e.message);
|
| + caught = true;
|
| }
|
| + assertTrue(caught);
|
| chrome.tabs.move(moveTabIds['b'], {"index": 10000}, pass(function(tabB) {
|
| assertEq(2, tabB.index);
|
| }));
|
|
|