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

Unified Diff: tools/crx_id/crx_id_unittest.py

Issue 16346003: Fix extension id calculation to take into account Windows encoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
Index: tools/crx_id/crx_id_unittest.py
diff --git a/tools/crx_id/crx_id_unittest.py b/tools/crx_id/crx_id_unittest.py
index 3d54ebfd24ccd4dd98b85da745287c406144c75b..9b6a3953a74dedda864685180e6aee77168a872a 100755
--- a/tools/crx_id/crx_id_unittest.py
+++ b/tools/crx_id/crx_id_unittest.py
@@ -63,13 +63,22 @@ class CrxIdUnittest(unittest.TestCase):
self.assertEqual(crx_id.GetCRXAppID('/tmp/temp_extension',
from_file_path=True),
'ajbbicncdkdlchpjplgjaglppbcbmaji')
+
+ def testFromWindowsPath(self):
+ self.assertEqual(crx_id.GetCRXAppID('D:\Documents\chrome\test_extension',
+ from_file_path=True,
+ encode_path_for_windows=True),
+ 'ppjciedebanjecfjlgmjbodeknmlkplo')
+
# Test drive letter normalization.
- kWinPathId = 'popnagglbbhjlobnnbcjnckakjoegnjp'
+ kWinPathId = 'fkdneihlpljnkeaganlandjfcdmglnoe'
self.assertEqual(crx_id.GetCRXAppID('c:\temp_extension',
- from_file_path=True),
+ from_file_path=True,
+ encode_path_for_windows=True),
kWinPathId)
self.assertEqual(crx_id.GetCRXAppID('C:\temp_extension',
- from_file_path=True),
+ from_file_path=True,
+ encode_path_for_windows=True),
kWinPathId)
if __name__ == '__main__':

Powered by Google App Engine
This is Rietveld 408576698