| OLD | NEW |
| 1 // Extract & return the resolution string from a filename, if any. | 1 // Extract & return the resolution string from a filename, if any. |
| 2 function resolutionFromFilename(filename) | 2 function resolutionFromFilename(filename) |
| 3 { | 3 { |
| 4 resolution = filename.replace(/^.*[^0-9]([0-9]+x[0-9]+)[^0-9].*$/, "$1"); | 4 resolution = filename.replace(/^.*[^0-9]([0-9]+x[0-9]+)[^0-9].*$/, "$1"); |
| 5 if (resolution != filename) { | 5 if (resolution != filename) { |
| 6 return resolution; | 6 return resolution; |
| 7 } | 7 } |
| 8 return ""; | 8 return ""; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 if (expectResizeEvents) { | 81 if (expectResizeEvents) { |
| 82 for (var i = 0; i < expectedResizeEventCount; ++i) { | 82 for (var i = 0; i < expectedResizeEventCount; ++i) { |
| 83 test.expectEvent(mediaElement, "resize"); | 83 test.expectEvent(mediaElement, "resize"); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 test.expectEvent(mediaElement, "ended"); | 86 test.expectEvent(mediaElement, "ended"); |
| 87 mediaElement.play(); | 87 mediaElement.play(); |
| 88 }); | 88 }); |
| 89 | 89 |
| 90 test.waitForExpectedEvents(function() { | 90 test.waitForExpectedEvents(function() { |
| 91 // TODO(wolenetz): Remove this hacky console warning once |
| 92 // desktop and android expectations match. It allows a |
| 93 // passing platform-specific expectation to override a |
| 94 // failing non-platform-specific expectation. |
| 95 console.warn('Ignore this warning. See https://crbug.com/568
704#c2'); |
| 96 |
| 91 test.done(); | 97 test.done(); |
| 92 }); | 98 }); |
| 93 }); | 99 }); |
| 94 }); | 100 }); |
| 95 }, description, { timeout: 10000 } ); | 101 }, description, { timeout: 10000 } ); |
| 96 }; | 102 }; |
| OLD | NEW |