Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 | 127 |
| 128 self.assertRaises(AssertionError, self.make_info, fake_sys('vms')) | 128 self.assertRaises(AssertionError, self.make_info, fake_sys('vms')) |
| 129 | 129 |
| 130 def test_os_version(self): | 130 def test_os_version(self): |
| 131 self.assertRaises(AssertionError, self.make_info, fake_sys('darwin'), fa ke_platform('10.4.3')) | 131 self.assertRaises(AssertionError, self.make_info, fake_sys('darwin'), fa ke_platform('10.4.3')) |
| 132 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.5. 1')).os_version, 'leopard') | 132 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.5. 1')).os_version, 'leopard') |
| 133 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.6. 1')).os_version, 'snowleopard') | 133 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.6. 1')).os_version, 'snowleopard') |
| 134 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.7. 1')).os_version, 'lion') | 134 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.7. 1')).os_version, 'lion') |
| 135 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.8. 1')).os_version, 'mountainlion') | 135 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.8. 1')).os_version, 'mountainlion') |
| 136 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.9. 0')).os_version, 'mavericks') | 136 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.9. 0')).os_version, 'mavericks') |
| 137 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.10 .0')).os_version, 'future') | 137 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.10 .0')).os_version, 'yosemite') |
| 138 self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.11 .0')).os_version, 'future') | |
|
ojan
2015/06/18 16:27:33
I don't think you should fix it in this patch...bu
Dirk Pranke
2015/06/18 17:23:03
Correct, We don't need to keep this around.
| |
| 138 | 139 |
| 139 self.assertEqual(self.make_info(fake_sys('linux2')).os_version, 'lucid') | 140 self.assertEqual(self.make_info(fake_sys('linux2')).os_version, 'lucid') |
| 140 | 141 |
| 141 self.assertEqual(self.make_info(fake_sys('freebsd8'), fake_platform('', '8.3-PRERELEASE')).os_version, '8.3-PRERELEASE') | 142 self.assertEqual(self.make_info(fake_sys('freebsd8'), fake_platform('', '8.3-PRERELEASE')).os_version, '8.3-PRERELEASE') |
| 142 self.assertEqual(self.make_info(fake_sys('freebsd9'), fake_platform('', '9.0-RELEASE')).os_version, '9.0-RELEASE') | 143 self.assertEqual(self.make_info(fake_sys('freebsd9'), fake_platform('', '9.0-RELEASE')).os_version, '9.0-RELEASE') |
| 143 | 144 |
| 144 self.assertRaises(AssertionError, self.make_info, fake_sys('win32', tupl e([5, 0, 1234]))) | 145 self.assertRaises(AssertionError, self.make_info, fake_sys('win32', tupl e([5, 0, 1234]))) |
| 145 self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 2, 1234]))). os_version, 'future') | 146 self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 2, 1234]))). os_version, 'future') |
| 146 self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 1, 7600]))). os_version, '7sp0') | 147 self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 1, 7600]))). os_version, '7sp0') |
| 147 self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 0, 1234]))). os_version, 'vista') | 148 self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 0, 1234]))). os_version, 'vista') |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 171 self.assertEqual(info.total_bytes_memory(), 1234) | 172 self.assertEqual(info.total_bytes_memory(), 1234) |
| 172 | 173 |
| 173 info = self.make_info(fake_sys('win32', tuple([6, 1, 7600]))) | 174 info = self.make_info(fake_sys('win32', tuple([6, 1, 7600]))) |
| 174 self.assertIsNone(info.total_bytes_memory()) | 175 self.assertIsNone(info.total_bytes_memory()) |
| 175 | 176 |
| 176 info = self.make_info(fake_sys('linux2')) | 177 info = self.make_info(fake_sys('linux2')) |
| 177 self.assertIsNone(info.total_bytes_memory()) | 178 self.assertIsNone(info.total_bytes_memory()) |
| 178 | 179 |
| 179 info = self.make_info(fake_sys('freebsd9')) | 180 info = self.make_info(fake_sys('freebsd9')) |
| 180 self.assertIsNone(info.total_bytes_memory()) | 181 self.assertIsNone(info.total_bytes_memory()) |
| OLD | NEW |