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

Unified Diff: grit/grd_reader_unittest.py

Issue 156443002: Provide defines as local variables in if-expressions. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk
Patch Set: rebased past is_posix fix, fixed is_posix again and updated unittests Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « grit/format/resource_map_unittest.py ('k') | grit/node/base.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/grd_reader_unittest.py
diff --git a/grit/grd_reader_unittest.py b/grit/grd_reader_unittest.py
index 065d280740983e5e1adc9fa0b349f2ba3f705382..fd4d08bfbdc803820b8e0b291039f46c39d08dd1 100644
--- a/grit/grd_reader_unittest.py
+++ b/grit/grd_reader_unittest.py
@@ -289,14 +289,6 @@ class GrdReaderUnittest(unittest.TestCase):
def testEarlyEnoughPlatformSpecification(self):
# This is a regression test for issue
# https://code.google.com/p/grit-i18n/issues/detail?id=23
- #
- # This test only works on platforms for which one of the is_xyz
- # shortcuts in .grd expressions is true. If this string remains
- # empty, abort the test.
- platform = base.Node.GetPlatformAssertion(sys.platform)
- if not platform:
- return
-
grd_text = u'''<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="1" current_release="1">
<release seq="1">
@@ -307,12 +299,12 @@ class GrdReaderUnittest(unittest.TestCase):
<!-- The assumption is that use_titlecase is never true for
this platform. When the platform isn't set to 'android'
early enough, we get a duplicate message name. -->
- <if expr="%s">
+ <if expr="os == '%s'">
<message name="IDS_XYZ">boo</message>
</if>
</messages>
</release>
- </grit>''' % platform
+ </grit>''' % sys.platform
with util.TempDir({}) as temp_dir:
grd_reader.Parse(StringIO.StringIO(grd_text), temp_dir.GetPath(),
target_platform='android')
« no previous file with comments | « grit/format/resource_map_unittest.py ('k') | grit/node/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698