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

Unified Diff: chrome/test/functional/media/media_test_matrix_unittest.py

Issue 9666032: Cleanup deprecated PyAuto media tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update year. Created 8 years, 9 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: chrome/test/functional/media/media_test_matrix_unittest.py
diff --git a/chrome/test/functional/media/media_test_matrix_unittest.py b/chrome/test/functional/media/media_test_matrix_unittest.py
deleted file mode 100755
index 9f1164aa3f6e081cde750a73af64385459096bb7..0000000000000000000000000000000000000000
--- a/chrome/test/functional/media/media_test_matrix_unittest.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env 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 _ReadCSVFile(self):
- """Reads CSV file for test and returns a media test matrix object.
-
- Returns:
- a media test matrix.
- """
- matrix = MediaTestMatrix()
- # Pyauto.DataDir() method is not used to avoid dependency to pyauto.
- data_file = os.path.join(os.pardir, os.pardir, 'data', 'media', 'csv',
- 'media_matrix_data.csv')
- matrix.ReadData(data_file)
- return matrix
-
- def testGenerateAllMediaInfosInCompactForm(self):
- matrix = self._ReadCSVFile()
- # Get video data only case.
- media_test_matrix_list = matrix.GenerateAllMediaInfosInCompactForm(True)
- self.assertEqual(len(media_test_matrix_list), 240,
- 'total number of elements in the returned list is wrong')
- # Get all media data.
- media_test_matrix_list = matrix.GenerateAllMediaInfosInCompactForm(False)
- self.assertEqual(len(media_test_matrix_list), 449,
- 'total number of elements in the returned list is wrong')
- mobile_test_info = MediaTestMatrix.LookForMediaInfoInCompactFormByNickName(
- media_test_matrix_list, 'mobile0.webm')
- self.assertEqual(mobile_test_info[2], 'mobile0.webm',
- 'the nickname of the returned element is wrong')
-
- def testGenerateAllMediaInfos(self):
- matrix = self._ReadCSVFile()
- # Get video data only case.
- media_test_matrix_list = matrix.GenerateAllMediaInfos(True)
- self.assertEqual(len(media_test_matrix_list), 240,
- 'total number of elements in the returned list is wrong')
- # Get all media data.
- media_test_matrix_list = matrix.GenerateAllMediaInfos(False)
- self.assertEqual(len(media_test_matrix_list), 449,
- 'total number of elements in the returned list is wrong')
- (info, url, link, tag, is_video, nickname) = (
- matrix.GenerateRandomMediaInfo())
- self.assertTrue(info is not None,
- 'randomly generated media info does not have spec')
- self.assertTrue(url is not None,
- 'randomly generated media info does not have url')
- self.assertTrue(link is not None,
- 'randomly generated media info does not have link')
- self.assertTrue(tag is not None,
- 'randomly generated media info does not have tag')
- self.assertTrue(nickname is not None,
- 'randomly generated media info does not have nickname')
-
-
-if __name__ == '__main__':
- unittest.main()
« no previous file with comments | « chrome/test/functional/media/media_test_matrix.py ('k') | chrome/test/functional/media/media_test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698