| Index: chrome/test/data/extensions/api_test/file_system/get_display_path_prettify_mac/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/file_system/get_display_path/test.js b/chrome/test/data/extensions/api_test/file_system/get_display_path_prettify_mac/test.js
|
| similarity index 59%
|
| copy from chrome/test/data/extensions/api_test/file_system/get_display_path/test.js
|
| copy to chrome/test/data/extensions/api_test/file_system/get_display_path_prettify_mac/test.js
|
| index 292ed7ecea0b7a27637b6fd79cf9c338c8b9e401..301d1a4b3fecd2799b41dfa9f134ddc251ddbf3e 100644
|
| --- a/chrome/test/data/extensions/api_test/file_system/get_display_path/test.js
|
| +++ b/chrome/test/data/extensions/api_test/file_system/get_display_path_prettify_mac/test.js
|
| @@ -1,3 +1,4 @@
|
| +
|
| // 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.
|
| @@ -6,11 +7,15 @@ chrome.test.runTests([
|
| function getDisplayPath() {
|
| chrome.fileSystem.chooseFile(chrome.test.callbackPass(function(entry) {
|
| chrome.test.assertEq('gold.txt', entry.name);
|
| - // Test that we can get the display path of the file.
|
| +
|
| + // The on-disk path of this file ends with '/test.localized/gold.txt', so
|
| + // check that getDisplayPath correctly localizes the path by stripping
|
| + // the '.localized' suffix.
|
| chrome.fileSystem.getDisplayPath(entry, chrome.test.callbackPass(
|
| function(path) {
|
| - chrome.test.assertTrue(path.indexOf("file_system") >= 0);
|
| - chrome.test.assertTrue(path.indexOf("gold.txt") >= 0);
|
| + var suffix = '/test/gold.txt';
|
| + chrome.test.assertEq(suffix,
|
| + path.substring(path.length - suffix.length));
|
| }));
|
| }));
|
| }
|
|
|