Commit 275195e9 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Integration tests directory_tree_context_menu.js: fix redundant test names

The names of these tests is above and beyond. Provide a commomn prefix
and shorten these names to something more sensible.

Bug: 836254
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I6a903c3fd8fbe91654b4c6fdf67e8f0474bc24e2
Reviewed-on: https://chromium-review.googlesource.com/1056777Reviewed-by: default avatarLuciano Pacheco (SYD) <lucmult@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558216}
parent 835ae72c
...@@ -189,56 +189,31 @@ WRAPPED_INSTANTIATE_TEST_CASE_P( ...@@ -189,56 +189,31 @@ WRAPPED_INSTANTIATE_TEST_CASE_P(
DirectoryTreeContextMenu, DirectoryTreeContextMenu,
FileManagerBrowserTest, FileManagerBrowserTest,
::testing::Values( ::testing::Values(
TestParameter(NOT_IN_GUEST_MODE, TestParameter(NOT_IN_GUEST_MODE, "dirCopyWithContextMenu"),
"copyFromDirectoryTreeWithContextMenu"), TestParameter(IN_GUEST_MODE, "dirCopyWithContextMenu"),
TestParameter(IN_GUEST_MODE, "copyFromDirectoryTreeWithContextMenu"), TestParameter(NOT_IN_GUEST_MODE, "dirCopyWithKeyboard"),
TestParameter(NOT_IN_GUEST_MODE, TestParameter(IN_GUEST_MODE, "dirCopyWithKeyboard"),
"copyFromDirectoryTreeWithKeyboardShortcut"), TestParameter(NOT_IN_GUEST_MODE, "dirCopyWithoutChangingCurrent"),
TestParameter(IN_GUEST_MODE, TestParameter(NOT_IN_GUEST_MODE, "dirCutWithContextMenu"),
"copyFromDirectoryTreeWithKeyboardShortcut"), TestParameter(IN_GUEST_MODE, "dirCutWithContextMenu"),
TestParameter(NOT_IN_GUEST_MODE, TestParameter(NOT_IN_GUEST_MODE, "dirCutWithKeyboard"),
"copyFromDirectoryTreeWithoutChaningCurrentDirectory"), TestParameter(IN_GUEST_MODE, "dirCutWithKeyboard"),
TestParameter(NOT_IN_GUEST_MODE, "cutFromDirectoryTreeWithContextMenu"), TestParameter(NOT_IN_GUEST_MODE, "dirPasteWithoutChangingCurrent"),
TestParameter(IN_GUEST_MODE, "cutFromDirectoryTreeWithContextMenu"), TestParameter(NOT_IN_GUEST_MODE, "dirPasteWithContextMenu"),
TestParameter(NOT_IN_GUEST_MODE, TestParameter(IN_GUEST_MODE, "dirPasteWithContextMenu"),
"cutFromDirectoryTreeWithKeyboardShortcut"), TestParameter(NOT_IN_GUEST_MODE, "dirPasteWithoutChangingCurrent"),
TestParameter(IN_GUEST_MODE, TestParameter(NOT_IN_GUEST_MODE, "dirRenameWithContextMenu"),
"cutFromDirectoryTreeWithKeyboardShortcut"), TestParameter(IN_GUEST_MODE, "dirRenameWithContextMenu"),
TestParameter(NOT_IN_GUEST_MODE, TestParameter(NOT_IN_GUEST_MODE, "dirRenameWithKeyboard"),
"cutFromDirectoryTreeWithoutChaningCurrentDirectory"), TestParameter(IN_GUEST_MODE, "dirRenameWithKeyboard"),
TestParameter(NOT_IN_GUEST_MODE, TestParameter(NOT_IN_GUEST_MODE, "dirRenameWithoutChangingCurrent"),
"pasteIntoFolderFromDirectoryTreeWithContextMenu"), TestParameter(NOT_IN_GUEST_MODE, "dirRenameToEmptyString"),
TestParameter(IN_GUEST_MODE, TestParameter(IN_GUEST_MODE, "dirRenameToEmptyString"),
"pasteIntoFolderFromDirectoryTreeWithContextMenu"), TestParameter(NOT_IN_GUEST_MODE, "dirRenameToExisting"),
TestParameter( TestParameter(IN_GUEST_MODE, "dirRenameToExisting"),
NOT_IN_GUEST_MODE, TestParameter(NOT_IN_GUEST_MODE, "dirCreateWithContextMenu"),
"pasteIntoFolderFromDirectoryTreeWithoutChaningCurrentDirectory"), TestParameter(NOT_IN_GUEST_MODE, "dirCreateWithKeyboard"),
TestParameter(NOT_IN_GUEST_MODE, TestParameter(NOT_IN_GUEST_MODE, "dirCreateWithoutChangingCurrent")));
"renameDirectoryFromDirectoryTreeWithContextMenu"),
TestParameter(IN_GUEST_MODE,
"renameDirectoryFromDirectoryTreeWithContextMenu"),
TestParameter(NOT_IN_GUEST_MODE,
"renameDirectoryFromDirectoryTreeWithKeyboardShortcut"),
TestParameter(IN_GUEST_MODE,
"renameDirectoryFromDirectoryTreeWithKeyboardShortcut"),
TestParameter(
NOT_IN_GUEST_MODE,
"renameDirectoryFromDirectoryTreeWithoutChangingCurrentDirectory"),
TestParameter(NOT_IN_GUEST_MODE,
"renameDirectoryToEmptyStringFromDirectoryTree"),
TestParameter(IN_GUEST_MODE,
"renameDirectoryToEmptyStringFromDirectoryTree"),
TestParameter(NOT_IN_GUEST_MODE,
"renameDirectoryToExistingOneFromDirectoryTree"),
TestParameter(IN_GUEST_MODE,
"renameDirectoryToExistingOneFromDirectoryTree"),
TestParameter(NOT_IN_GUEST_MODE,
"createDirectoryFromDirectoryTreeWithContextMenu"),
TestParameter(NOT_IN_GUEST_MODE,
"createDirectoryFromDirectoryTreeWithKeyboardShortcut"),
TestParameter(NOT_IN_GUEST_MODE,
"createDirectoryFromDirectoryTreeWithoutChangingCurrentDi"
"rectory")));
WRAPPED_INSTANTIATE_TEST_CASE_P( WRAPPED_INSTANTIATE_TEST_CASE_P(
DriveSpecific, DriveSpecific,
......
...@@ -253,9 +253,9 @@ function createDirectoryFromDirectoryTree( ...@@ -253,9 +253,9 @@ function createDirectoryFromDirectoryTree(
} }
/** /**
* Test case for copying a directory from directory tree by using context menu. * Tests copying a directory from directory tree with context menu.
*/ */
testcase.copyFromDirectoryTreeWithContextMenu = function() { testcase.dirCopyWithContextMenu = function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
windowId = id; windowId = id;
...@@ -268,10 +268,9 @@ testcase.copyFromDirectoryTreeWithContextMenu = function() { ...@@ -268,10 +268,9 @@ testcase.copyFromDirectoryTreeWithContextMenu = function() {
}; };
/** /**
* Test case for copying a directory from directory tree by using keyboard * Tests copying a directory from directory tree with the keyboard shortcut.
* shortcut.
*/ */
testcase.copyFromDirectoryTreeWithKeyboardShortcut = function() { testcase.dirCopyWithKeyboard = function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
windowId = id; windowId = id;
...@@ -286,10 +285,9 @@ testcase.copyFromDirectoryTreeWithKeyboardShortcut = function() { ...@@ -286,10 +285,9 @@ testcase.copyFromDirectoryTreeWithKeyboardShortcut = function() {
}; };
/** /**
* Test case for copying a directory from directory tree without changing * Tests copying a directory without changing the current directory.
* current directory.
*/ */
testcase.copyFromDirectoryTreeWithoutChaningCurrentDirectory = function() { testcase.dirCopyWithoutChangingCurrent = function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
windowId = id; windowId = id;
...@@ -302,9 +300,9 @@ testcase.copyFromDirectoryTreeWithoutChaningCurrentDirectory = function() { ...@@ -302,9 +300,9 @@ testcase.copyFromDirectoryTreeWithoutChaningCurrentDirectory = function() {
}; };
/** /**
* Test case for cutting a directory from directory tree by using context menu. * Tests cutting a directory with the context menu.
*/ */
testcase.cutFromDirectoryTreeWithContextMenu = function() { testcase.dirCutWithContextMenu = function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
windowId = id; windowId = id;
...@@ -321,10 +319,9 @@ testcase.cutFromDirectoryTreeWithContextMenu = function() { ...@@ -321,10 +319,9 @@ testcase.cutFromDirectoryTreeWithContextMenu = function() {
}; };
/** /**
* Test case for cutting a directory from directory tree by using keyboard * Tests cutting a directory with the keyboard shortcut.
* shortcut.
*/ */
testcase.cutFromDirectoryTreeWithKeyboardShortcut = function() { testcase.dirCutWithKeyboard = function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
windowId = id; windowId = id;
...@@ -343,10 +340,9 @@ testcase.cutFromDirectoryTreeWithKeyboardShortcut = function() { ...@@ -343,10 +340,9 @@ testcase.cutFromDirectoryTreeWithKeyboardShortcut = function() {
}; };
/** /**
* Test case for cutting a directory from directory tree without changing * Tests cutting a directory without changing the current directory.
* current directory.
*/ */
testcase.cutFromDirectoryTreeWithoutChaningCurrentDirectory = function() { testcase.dirCutWithoutChangingCurrent = function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
windowId = id; windowId = id;
...@@ -362,9 +358,9 @@ testcase.cutFromDirectoryTreeWithoutChaningCurrentDirectory = function() { ...@@ -362,9 +358,9 @@ testcase.cutFromDirectoryTreeWithoutChaningCurrentDirectory = function() {
}; };
/** /**
* Test case for pasting into folder from directory tree by using context menu. * Tests pasting into folder with the context menu.
*/ */
testcase.pasteIntoFolderFromDirectoryTreeWithContextMenu = function() { testcase.dirPasteWithContextMenu = function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
// Copy photos directory as a test data. // Copy photos directory as a test data.
...@@ -401,11 +397,9 @@ testcase.pasteIntoFolderFromDirectoryTreeWithContextMenu = function() { ...@@ -401,11 +397,9 @@ testcase.pasteIntoFolderFromDirectoryTreeWithContextMenu = function() {
}; };
/** /**
* Test case for pasting into a folder from directory tree without changing * Tests pasting into a folder without changing the current directory.
* current directory.
*/ */
testcase.pasteIntoFolderFromDirectoryTreeWithoutChaningCurrentDirectory = testcase.dirPasteWithoutChangingCurrent = function() {
function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
windowId = id; windowId = id;
...@@ -429,28 +423,25 @@ testcase.pasteIntoFolderFromDirectoryTreeWithoutChaningCurrentDirectory = ...@@ -429,28 +423,25 @@ testcase.pasteIntoFolderFromDirectoryTreeWithoutChaningCurrentDirectory =
}; };
/** /**
* Test case for renaming directory from directory tree by using context menu. * Tests renaming a folder with the context menu.
*/ */
testcase.renameDirectoryFromDirectoryTreeWithContextMenu = function() { testcase.dirRenameWithContextMenu = function() {
testPromise(renameDirectoryFromDirectoryTreeSuccessCase( testPromise(renameDirectoryFromDirectoryTreeSuccessCase(
false /* do not use keyboard shortcut */)); false /* do not use keyboard shortcut */));
}; };
/** /**
* Test case for renaming directory from directory tree by using keyboard * Tests renaming folder with the keyboard shortcut.
* shortcut.
*/ */
testcase.renameDirectoryFromDirectoryTreeWithKeyboardShortcut = function() { testcase.dirRenameWithKeyboard = function() {
testPromise(renameDirectoryFromDirectoryTreeSuccessCase( testPromise(renameDirectoryFromDirectoryTreeSuccessCase(
true /* use keyboard shortcut */)); true /* use keyboard shortcut */));
}; };
/** /**
* Test case for renaming directory from directory tree without changing current * Tests renaming folder without changing the current directory.
* directory.
*/ */
testcase.renameDirectoryFromDirectoryTreeWithoutChangingCurrentDirectory = testcase.dirRenameWithoutChangingCurrent = function() {
function() {
var windowId; var windowId;
testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) { testPromise(setupForDirectoryTreeContextMenuTest().then(function(id) {
windowId = id; windowId = id;
...@@ -471,45 +462,42 @@ testcase.renameDirectoryFromDirectoryTreeWithoutChangingCurrentDirectory = ...@@ -471,45 +462,42 @@ testcase.renameDirectoryFromDirectoryTreeWithoutChangingCurrentDirectory =
}; };
/** /**
* Test case for renaming directory to empty string. * Tests renaming a folder to an empty string.
*/ */
testcase.renameDirectoryToEmptyStringFromDirectoryTree = function() { testcase.dirRenameToEmptyString = function() {
testPromise(renameDirectoryFromDirectoryTreeAndConfirmAlertDialog('')); testPromise(renameDirectoryFromDirectoryTreeAndConfirmAlertDialog(''));
}; };
/** /**
* Test case for renaming directory to exsiting directory name. * Tests renaming folder an existing name.
*/ */
testcase.renameDirectoryToExistingOneFromDirectoryTree = function() { testcase.dirRenameToExisting = function() {
testPromise(renameDirectoryFromDirectoryTreeAndConfirmAlertDialog( testPromise(renameDirectoryFromDirectoryTreeAndConfirmAlertDialog(
'destination')); 'destination'));
}; };
/** /**
* Test case for creating directory from directory tree by using context menu. * Tests creating a folder with the context menu.
*/ */
testcase.createDirectoryFromDirectoryTreeWithContextMenu = function() { testcase.dirCreateWithContextMenu = function() {
testPromise(createDirectoryFromDirectoryTree( testPromise(createDirectoryFromDirectoryTree(
false /* do not use keyboard shortcut */, false /* do not use keyboard shortcut */,
true /* change current directory */)); true /* change current directory */));
}; };
/** /**
* Test case for creating directory from directory tree by using keyboard * Tests creating a folder with the keyboard shortcut.
* shortcut.
*/ */
testcase.createDirectoryFromDirectoryTreeWithKeyboardShortcut = function() { testcase.dirCreateWithKeyboard = function() {
testPromise(createDirectoryFromDirectoryTree( testPromise(createDirectoryFromDirectoryTree(
true /* use keyboard shortcut */, true /* use keyboard shortcut */,
true /* change current directory */)); true /* change current directory */));
}; };
/** /**
* Test case for creating directory from directory tree without changing current * Tests creating folder without changing the current directory.
* directory.
*/ */
testcase.createDirectoryFromDirectoryTreeWithoutChangingCurrentDirectory = testcase.dirCreateWithoutChangingCurrent = function() {
function() {
testPromise(createDirectoryFromDirectoryTree( testPromise(createDirectoryFromDirectoryTree(
false /* Do not use keyboard shortcut */, false /* Do not use keyboard shortcut */,
false /* Do not change current directory */)); false /* Do not change current directory */));
......
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