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

Unified Diff: grit/node/misc_unittest.py

Issue 1320683002: Write sources from flattenhtml to depfiles. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Created 5 years, 4 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/node/misc.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/node/misc_unittest.py
diff --git a/grit/node/misc_unittest.py b/grit/node/misc_unittest.py
index 7eb67a8e73a37dd08f25506f1b95c4edd5a15d3a..dea81b65fd3b5128e3efaa79f84649195d44c723 100644
--- a/grit/node/misc_unittest.py
+++ b/grit/node/misc_unittest.py
@@ -56,6 +56,7 @@ class GritNodeUnittest(unittest.TestCase):
# Verifies that GetInputFiles() returns the correct list of files
# corresponding to ChromeScaledImage nodes when assets are missing.
def testGetInputFilesChromeScaledImage(self):
+ chrome_html_path = util.PathFromRoot('grit/testdata/chrome_html.html')
xml = '''<?xml version="1.0" encoding="utf-8"?>
<grit latest_public_release="0" current_release="1">
<outputs>
@@ -66,12 +67,15 @@ class GritNodeUnittest(unittest.TestCase):
<structures fallback_to_low_resolution="true">
<structure type="chrome_scaled_image" name="IDR_A" file="a.png" />
<structure type="chrome_scaled_image" name="IDR_B" file="b.png" />
+ <structure type="chrome_html" name="HTML_FILE1" file="%s" flattenhtml="true" />
</structures>
</release>
- </grit>'''
+ </grit>''' % chrome_html_path
grd = grd_reader.Parse(StringIO.StringIO(xml), util.PathFromRoot('grit/testdata'))
- expected = ['default_100_percent/a.png', 'default_100_percent/b.png', 'special_100_percent/a.png']
+ expected = ['chrome_html.html', 'default_100_percent/a.png',
+ 'default_100_percent/b.png', 'included_sample.html',
+ 'special_100_percent/a.png']
actual = [os.path.relpath(path, util.PathFromRoot('grit/testdata')) for path in grd.GetInputFiles()]
# Convert path separator for Windows paths.
actual = [path.replace('\\', '/') for path in actual]
« no previous file with comments | « grit/node/misc.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698