Chromium Code Reviews| Index: chrome/test/functional/media_test_matrix_unittest.py |
| diff --git a/chrome/test/functional/media_test_matrix_unittest.py b/chrome/test/functional/media_test_matrix_unittest.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fce769362c70a741db92b68f97e7e84786e95913 |
| --- /dev/null |
| +++ b/chrome/test/functional/media_test_matrix_unittest.py |
| @@ -0,0 +1,27 @@ |
| +#!/usr/bin/python |
| + |
| +# Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import os |
| +import random |
| +import unittest |
| +from media_test_matrix import MediaTestMatrix |
| + |
| + |
| +class MediaTestMatrixTest(unittest.TestCase): |
| + """Unit test for MediaTestMatrix class.""" |
| + |
| + def testGenerateAllMediaInfos(self): |
| + data_file = os.path.join('..', 'data', 'media', 'media_matrix_data.csv') |
|
Nirnimesh
2011/03/17 02:32:00
use self.DataDir()
imasaki1
2011/03/17 23:29:18
Done.
|
| + matrix = MediaTestMatrix() |
| + matrix.ReadData(data_file) |
| + media_test_matrix_list = matrix.GenerateAllMediaInfosInCompactForm(True) |
| + self.assertEqual(len(media_test_matrix_list), 240) |
| + mobile_test_info = MediaTestMatrix.LookForMediaInfoByNickName( |
| + media_test_matrix_list, "mobile0.webm") |
| + self.assertEqual(mobile_test_info[1], "mobile0.webm") |
| + |
|
dennis_jeffrey
2011/03/17 17:13:36
Don't we need more unit tests? For example, funct
imasaki1
2011/03/17 23:29:18
Done.
|
| +if __name__ == '__main__': |
| + unittest.main() |