Fix chromeos_file_browser.ChromeosFileBrowserTest.testOpenMediaFiles

chrome/test/data/media was moved to content/test/data/media

BUG=None
TEST=None

R=rohitbm@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10823419

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152456 0039d316-1c4b-4281-b951-d872f2087c98
parent 55e02302
......@@ -78,7 +78,8 @@ class ChromeosFileBrowserTest(pyauto.PyUITest):
# .mov and .3gp only work in the Media Player. Once these format are
# supported on ChromeOS, include them in the test.
for fname in media_files:
test_utils.CopyFileFromDataDirToDownloadDir(self, 'media/' + fname)
test_utils.CopyFileFromContentDataDirToDownloadDir(self,
'media/' + fname)
for fname in private_media_files:
test_utils.CopyFileFromDataDirToDownloadDir(self, 'pyauto_private/media/' +\
fname)
......
......@@ -44,6 +44,19 @@ def CopyFileFromDataDirToDownloadDir(test, file_path):
download_dir = test.GetDownloadDirectory().value()
shutil.copy(data_file, download_dir)
def CopyFileFromContentDataDirToDownloadDir(test, file_path):
"""Copy a file from content data directory to downloads directory.
Args:
test: derived from pyauto.PyUITest - base class for UI test cases.
path: path of the file relative to the data directory
"""
data_file = os.path.join(test.ContentDataDir(), file_path)
download_dir = test.GetDownloadDirectory().value()
shutil.copy(data_file, download_dir)
def DownloadFileFromDownloadsDataDir(test, file_name):
"""Download a file from downloads data directory, in first tab, first window.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment