Commit 42c5d51e authored by hirono@chromium.org's avatar hirono@chromium.org

Files.app: Added the nameText field to TestEntryInfo class.

Originally, we assume the target name of entry provided to FakeFileSystem and
expected name actually shown in the file list is the same. But for hosted
documents on the drive, both name can be different. To handle the case, this CL
adds the nameText field to TestEntryInfo class.

BUG=279774
TEST=file_manager_browsertests

Review URL: https://chromiumcodereview.appspot.com/23926014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223556 0039d316-1c4b-4281-b951-d872f2087c98
parent 56a12156
...@@ -25,33 +25,36 @@ var SharedOption = Object.freeze({ ...@@ -25,33 +25,36 @@ var SharedOption = Object.freeze({
/** /**
* File system entry information for tests. * File system entry information for tests.
* *
* @param {EntryType} entryType Entry type. * @param {EntryType} type Entry type.
* @param {string} sourceFileName Source file name that provides file contents. * @param {string} sourceFileName Source file name that provides file contents.
* @param {string} targetName Name of entry on the test file system. * @param {string} targetName Name of entry on the test file system.
* @param {string} mimeType Mime type. * @param {string} mimeType Mime type.
* @param {string} typeText Type name to be shown in the type column.
* @param {string} sizeText Size text to be shown in the size column.
* @param {SharedOption} sharedOption Shared option. * @param {SharedOption} sharedOption Shared option.
* @param {string} lastModifiedTime Last modified time as a text to be shown in * @param {string} lastModifiedTime Last modified time as a text to be shown in
* the last modified column. * the last modified column.
* @param {string} nameText File name to be shown in the name column.
* @param {string} sizeText Size text to be shown in the size column.
* @param {string} typeText Type name to be shown in the type column.
* @constructor * @constructor
*/ */
var TestEntryInfo = function(entryType, var TestEntryInfo = function(type,
sourceFileName, sourceFileName,
targetName, targetName,
mimeType, mimeType,
typeText,
sizeText,
sharedOption, sharedOption,
lastModifiedTime) { lastModifiedTime,
this.entryType = entryType; nameText,
sizeText,
typeText) {
this.type = type;
this.sourceFileName = sourceFileName; this.sourceFileName = sourceFileName;
this.targetName = targetName; this.targetName = targetName;
this.mimeType = mimeType; this.mimeType = mimeType;
this.typeText = typeText;
this.sizeText = sizeText;
this.sharedOption = sharedOption; this.sharedOption = sharedOption;
this.lastModifiedTime = lastModifiedTime; this.lastModifiedTime = lastModifiedTime;
this.nameText = nameText;
this.sizeText = sizeText;
this.typeText = typeText;
Object.freeze(this); Object.freeze(this);
}; };
...@@ -59,7 +62,7 @@ var TestEntryInfo = function(entryType, ...@@ -59,7 +62,7 @@ var TestEntryInfo = function(entryType,
* Obtains a expected row contents of the file in the file list. * Obtains a expected row contents of the file in the file list.
*/ */
TestEntryInfo.prototype.getExpectedRow = function() { TestEntryInfo.prototype.getExpectedRow = function() {
return [this.targetName, this.sizeText, this.typeText, this.lastModifiedTime]; return [this.nameText, this.sizeText, this.typeText, this.lastModifiedTime];
}; };
/** /**
...@@ -101,8 +104,8 @@ var EXPECTED_FILES_BEFORE_DRIVE = [ ...@@ -101,8 +104,8 @@ var EXPECTED_FILES_BEFORE_DRIVE = [
var ENTRIES = { var ENTRIES = {
newlyAdded: new TestEntryInfo( newlyAdded: new TestEntryInfo(
EntryType.FILE, 'music.ogg', 'newly added file.ogg', EntryType.FILE, 'music.ogg', 'newly added file.ogg',
'audio/ogg', 'OGG audio', '14 KB', SharedOption.NONE, 'audio/ogg', SharedOption.NONE, 'Sep 4, 1998 12:00 AM',
'Sep 4, 1998 12:00 AM') 'newly added file.ogg', '14 KB', 'OGG audio')
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment