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

Side by Side Diff: chrome/test/functional/chromeos_file_browser.py

Issue 10823419: Fix chromeos_file_browser.ChromeosFileBrowserTest.testOpenMediaFiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/functional/test_utils.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import pyauto_functional 6 import pyauto_functional
7 import pyauto 7 import pyauto
8 8
9 import chromeos.file_browser 9 import chromeos.file_browser
10 import test_utils 10 import test_utils
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 def testOpenMediaFiles(self): 72 def testOpenMediaFiles(self):
73 """Test we can open media files from the file browser dialog.""" 73 """Test we can open media files from the file browser dialog."""
74 media_files = ['bear.mp4', 'bear.ogv', 'bear_pcm.wav', 'bear.webm'] 74 media_files = ['bear.mp4', 'bear.ogv', 'bear_pcm.wav', 'bear.webm']
75 private_media_files = ['emerge.m4a', 'sample.mp3', 'sample.m4v', 75 private_media_files = ['emerge.m4a', 'sample.mp3', 'sample.m4v',
76 'sample.ogg'] 76 'sample.ogg']
77 # TODO: .avi, .wmv are not yet (fully) supported on ChromeOS. 77 # TODO: .avi, .wmv are not yet (fully) supported on ChromeOS.
78 # .mov and .3gp only work in the Media Player. Once these format are 78 # .mov and .3gp only work in the Media Player. Once these format are
79 # supported on ChromeOS, include them in the test. 79 # supported on ChromeOS, include them in the test.
80 for fname in media_files: 80 for fname in media_files:
81 test_utils.CopyFileFromDataDirToDownloadDir(self, 'media/' + fname) 81 test_utils.CopyFileFromContentDataDirToDownloadDir(self,
82 'media/' + fname)
82 for fname in private_media_files: 83 for fname in private_media_files:
83 test_utils.CopyFileFromDataDirToDownloadDir(self, 'pyauto_private/media/' +\ 84 test_utils.CopyFileFromDataDirToDownloadDir(self, 'pyauto_private/media/' +\
84 fname) 85 fname)
85 for fname in media_files + private_media_files: 86 for fname in media_files + private_media_files:
86 file_browser = self._GetOpenDialogFileBrowser() 87 file_browser = self._GetOpenDialogFileBrowser()
87 self.assertTrue(file_browser, msg='File browser failed to initialize.') 88 self.assertTrue(file_browser, msg='File browser failed to initialize.')
88 if file_browser.CurrentDirectory() != '/Downloads': 89 if file_browser.CurrentDirectory() != '/Downloads':
89 file_browser.ChangeDirectory('/Downloads/') 90 file_browser.ChangeDirectory('/Downloads/')
90 self.assertTrue(file_browser.Select(fname), 91 self.assertTrue(file_browser.Select(fname),
91 msg='"%s" does not exist.' % fname) 92 msg='"%s" does not exist.' % fname)
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 msg='Remaining disk space = %dKB.' % remaining) 238 msg='Remaining disk space = %dKB.' % remaining)
238 self.assertTrue(total > 0, 239 self.assertTrue(total > 0,
239 msg='Total disk space = %dKB.' % total) 240 msg='Total disk space = %dKB.' % total)
240 self.assertTrue(total > remaining, 241 self.assertTrue(total > remaining,
241 msg='Total space(%dKB) <= remaining space(%dKB).' % 242 msg='Total space(%dKB) <= remaining space(%dKB).' %
242 (total, remaining)) 243 (total, remaining))
243 244
244 245
245 if __name__ == '__main__': 246 if __name__ == '__main__':
246 pyauto_functional.Main() 247 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | chrome/test/functional/test_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698