Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Issue 2697383002: Fix xmb_unittest.py in GRIT. (Closed)

Created:
3 years, 10 months ago by Alexei Svitkine (slow)
Modified:
3 years, 10 months ago
Reviewers:
Nico
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix xmb_unittest.py in GRIT. It was broken on systems with a "narrow" build of Python, see: http://stackoverflow.com/questions/31603075/how-can-i-represent-this-regex-to-not-get-a-bad-character-range-error It turns out the regex was not needed at all - as invalid characters do not even reach that point. This removes the check and adds a unit test to verify that the tool produces an error when characters outside the valid range are specified. BUG=693086 Review-Url: https://codereview.chromium.org/2697383002 Cr-Commit-Position: refs/heads/master@{#451370} Committed: https://chromium.googlesource.com/chromium/src/+/56dfab6710187ab2f41a917c1ce99529836bd6e7

Patch Set 1 #

Patch Set 2 : comment change #

Patch Set 3 : Remove regex and add a test. #

Patch Set 4 : No need for tempfile. #

Patch Set 5 : Correct sequence for \U00110000. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -11 lines) Patch
M tools/grit/grit/tool/xmb.py View 1 2 2 chunks +1 line, -11 lines 0 comments Download
M tools/grit/grit/tool/xmb_unittest.py View 1 2 3 4 2 chunks +20 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (11 generated)
Alexei Svitkine (slow)
3 years, 10 months ago (2017-02-16 20:25:49 UTC) #3
Nico
Thanks! Doesn't this break things on wide python builds, where each char is probably ucs-4 ...
3 years, 10 months ago (2017-02-16 20:37:12 UTC) #5
Alexei Svitkine (slow)
On 2017/02/16 20:37:12, Nico wrote: > Thanks! Doesn't this break things on wide python builds, ...
3 years, 10 months ago (2017-02-16 21:12:19 UTC) #6
Nico
lgtm since it helps. Do you understand why it works on wide builds though? I ...
3 years, 10 months ago (2017-02-16 21:26:00 UTC) #7
Alexei Svitkine (slow)
Thanks for looking deeper. Re-reading the link, actually I agree with you - this shouldn't ...
3 years, 10 months ago (2017-02-16 21:32:31 UTC) #8
Alexei Svitkine (slow)
I don't get why it works on wide Python. The unit test does indeed specify ...
3 years, 10 months ago (2017-02-17 16:29:36 UTC) #9
Alexei Svitkine (slow)
Looking at this more closely, I think it's because of how the new syntax interacts ...
3 years, 10 months ago (2017-02-17 17:41:23 UTC) #10
Alexei Svitkine (slow)
On 2017/02/17 17:41:23, Alexei Svitkine (slow) wrote: > Looking at this more closely, I think ...
3 years, 10 months ago (2017-02-17 18:16:43 UTC) #11
Nico
On 2017/02/17 18:16:43, Alexei Svitkine (slow) wrote: > On 2017/02/17 17:41:23, Alexei Svitkine (slow) wrote: ...
3 years, 10 months ago (2017-02-17 18:32:15 UTC) #12
Alexei Svitkine (slow)
PTAL. I removed the regexp and crafted a test that verified that an error is ...
3 years, 10 months ago (2017-02-17 18:52:09 UTC) #13
Nico
lgtm
3 years, 10 months ago (2017-02-17 18:55:17 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2697383002/60001
3 years, 10 months ago (2017-02-17 19:12:26 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2697383002/80001
3 years, 10 months ago (2017-02-17 19:23:11 UTC) #22
commit-bot: I haz the power
3 years, 10 months ago (2017-02-17 20:24:15 UTC) #25
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/56dfab6710187ab2f41a917c1ce9...

Powered by Google App Engine
This is Rietveld 408576698