OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/media/webrtc_browsertest_common.h" | 5 #include "chrome/browser/media/webrtc_browsertest_common.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 FILE_PATH_LITERAL("webrtc/resources"); | 22 FILE_PATH_LITERAL("webrtc/resources"); |
23 const base::FilePath::CharType kReferenceFileName360p[] = | 23 const base::FilePath::CharType kReferenceFileName360p[] = |
24 FILE_PATH_LITERAL("reference_video_640x360_30fps"); | 24 FILE_PATH_LITERAL("reference_video_640x360_30fps"); |
25 const base::FilePath::CharType kReferenceFileName720p[] = | 25 const base::FilePath::CharType kReferenceFileName720p[] = |
26 FILE_PATH_LITERAL("reference_video_1280x720_30fps"); | 26 FILE_PATH_LITERAL("reference_video_1280x720_30fps"); |
27 const base::FilePath::CharType kYuvFileExtension[] = FILE_PATH_LITERAL("yuv"); | 27 const base::FilePath::CharType kYuvFileExtension[] = FILE_PATH_LITERAL("yuv"); |
28 const base::FilePath::CharType kY4mFileExtension[] = FILE_PATH_LITERAL("y4m"); | 28 const base::FilePath::CharType kY4mFileExtension[] = FILE_PATH_LITERAL("y4m"); |
29 | 29 |
30 // This message describes how to modify your .gclient to get the reference | 30 // This message describes how to modify your .gclient to get the reference |
31 // video files downloaded for you. | 31 // video files downloaded for you. |
32 static const char kAdviseOnGclientSolution[] = | 32 const char kAdviseOnGclientSolution[] = |
33 "You need to add this solution to your .gclient to run this test:\n" | 33 "To run this test, you must run download_from_google_storage --config\n" |
| 34 "and follow the instructions (use 'browser' for project id)\n" |
| 35 "You also need to add this solution to your .gclient:\n" |
34 "{\n" | 36 "{\n" |
35 " \"name\" : \"webrtc.DEPS\",\n" | 37 " \"name\" : \"webrtc.DEPS\",\n" |
36 " \"url\" : \"https://chromium.googlesource.com/chromium/deps/" | 38 " \"url\" : \"https://chromium.googlesource.com/chromium/deps/" |
37 "webrtc/webrtc.DEPS\",\n" | 39 "webrtc/webrtc.DEPS\",\n" |
38 "}"; | 40 "}\n" |
| 41 "and run gclient sync. This will download the required ref files."; |
39 | 42 |
40 const int kDefaultPollIntervalMsec = 250; | 43 const int kDefaultPollIntervalMsec = 250; |
41 | 44 |
42 bool IsErrorResult(const std::string& result) { | 45 bool IsErrorResult(const std::string& result) { |
43 return base::StartsWith(result, "failed-", | 46 return base::StartsWith(result, "failed-", |
44 base::CompareCase::INSENSITIVE_ASCII); | 47 base::CompareCase::INSENSITIVE_ASCII); |
45 } | 48 } |
46 | 49 |
47 base::FilePath GetReferenceFilesDir() { | 50 base::FilePath GetReferenceFilesDir() { |
48 base::FilePath test_data_dir; | 51 base::FilePath test_data_dir; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 157 } |
155 } | 158 } |
156 LOG(ERROR) | 159 LOG(ERROR) |
157 << "Timed out while waiting for " << javascript | 160 << "Timed out while waiting for " << javascript |
158 << " to evaluate to " << evaluates_to << "; last result was '" << result | 161 << " to evaluate to " << evaluates_to << "; last result was '" << result |
159 << "'"; | 162 << "'"; |
160 return false; | 163 return false; |
161 } | 164 } |
162 | 165 |
163 } // namespace test | 166 } // namespace test |
OLD | NEW |