New issue
Advanced search Search tips

Issue 907966 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 23
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Unittest remove requirement of most of translation strings.

Project Member Reported by lucmult@chromium.org, Nov 23

Issue description

Currently when adding a new translation string several unittest might fail if they run the line that uses the new translated text.

For vast majority of unit tests the translated text doesn't matter, so we can simplify by returning the actual message id as the translated text making the unittest less brittle. 
 
Status: Fixed (was: Started)
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e30855dff7b0f2b87ec3b7da1295e2d509450956

commit e30855dff7b0f2b87ec3b7da1295e2d509450956
Author: Luciano Pacheco <lucmult@chromium.org>
Date: Fri Nov 23 04:50:24 2018

Files app: Simplify getString in unittest

Change all unit tests inside ui/file_manager/file_manager/ to not
require each translation string, by returning the message id as the
translated string by default.

Some tests check against specific text, so only those specific texts
were kept.

Bug:  907966 
Change-Id: I9d6ad880c6cb7105b7828819391878a682b3e6ed
Reviewed-on: https://chromium-review.googlesource.com/c/1349140
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610535}
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/background/js/crostini_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/background/js/device_handler_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/background/js/duplicate_finder_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/background/js/file_operation_handler_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/background/js/media_import_handler_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/background/js/volume_manager_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/common/js/importer_common_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/common/js/util_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/foreground/js/actions_model_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/foreground/js/import_controller_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/foreground/js/navigation_list_model_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/foreground/js/progress_center_item_group_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/foreground/js/providers_model_unittest.js
[modify] https://crrev.com/e30855dff7b0f2b87ec3b7da1295e2d509450956/ui/file_manager/file_manager/foreground/js/ui/directory_tree_unittest.js

Sign in to add a comment