New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 852349 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

SyncCycleSnapshotTest.SyncCycleSnapshotToValue test fails depending on locale

Project Member Reported by tmonius...@opera.com, Jun 13 2018

Issue description

Chrome Version: 69.0.3457.0 (Developer Build) (64-bit)
OS: Win7

What steps will reproduce the problem?
(1) Go to Control Panel -> Region and Language -> Formats and choose format different than English (I've tested with Polish (Poland)).
(2) Run SyncCycleSnapshotTest.SyncCycleSnapshotToValue test.

What happens instead?

[ RUN      ] SyncCycleSnapshotTest.SyncCycleSnapshotToValue
../../base/test/values_test_util.cc(54): error: Expected equality of these values:
  expected_value
    Which is: "0h 30m"
  string_value
    Which is: "0 g. i 30 min"
short_poll_interval
Stack trace:
Backtrace:
        Ordinal0 [0x0000000141017D47+22707527]
        Ordinal0 [0x00000001410178EC+22706412]
        IsSandboxedProcess [0x0000000142A0D4B5+342137]
        Ordinal0 [0x000000014077E0F0+13689072]

../../base/test/values_test_util.cc(54): error: Expected equality of these values:
  expected_value
    Which is: "3h 0m"
  string_value
    Which is: "3 g. i 0 min"
long_poll_interval
Stack trace:
Backtrace:
        Ordinal0 [0x0000000141017D47+22707527]
        Ordinal0 [0x00000001410178EC+22706412]
        IsSandboxedProcess [0x0000000142A0D4B5+342137]
        Ordinal0 [0x000000014077E160+13689184]

[  FAILED  ] SyncCycleSnapshotTest.SyncCycleSnapshotToValue (33 ms)
 
interesting... I was under the impression those tests only get exercised in a fixed locale. 
If that's not the case, then instead of comparing the string we either need to parse it back into a time interval, or find a more relaxed way (regex?) to do that comparison.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 13 2018

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

commit 172cd65b3db6544185c94fdb296fd61e79577f8c
Author: Tomasz Moniuszko <tmoniuszko@opera.com>
Date: Wed Jun 13 14:13:45 2018

Force en_US locale in SyncCycleSnapshotToValue test

Bug:  852349 
Change-Id: I8367c10390caf2f5eda219eadb958e10e049c4cc
Reviewed-on: https://chromium-review.googlesource.com/1098933
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Tim Schumann <tschumann@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566826}
[modify] https://crrev.com/172cd65b3db6544185c94fdb296fd61e79577f8c/components/sync/engine/cycle/sync_cycle_snapshot_unittest.cc

Status: Fixed (was: Untriaged)

Sign in to add a comment