Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <body> | 2 <body> |
| 3 <script type="text/javascript"> | 3 <script type="text/javascript"> |
| 4 // Since promises run asynchronously, use the pages title to keep track | 4 // Since promises run asynchronously, use the pages title to keep track |
| 5 // of the result. | 5 // of the result. |
| 6 function setResultInTitle(title) { | 6 function setResultInTitle(title) { |
| 7 document.title = title; | 7 if (title == "" || title == "success" || |
| 8 title == "Unsupported keySystem" || | |
| 9 title == "None of the requested configurations were supported.") { | |
| 10 document.title = title; | |
| 11 } else { | |
| 12 console.log("Result: " + title); | |
| 13 document.title = "failure"; | |
|
ddorwin
2016/03/31 22:31:12
I believe the title watcher only checks the start
hubbe
2016/04/01 00:20:59
It does not: https://code.google.com/p/chromium/co
ddorwin
2016/04/01 00:36:42
Hmm. We had one test where something like that was
jrummell
2016/04/01 00:52:52
I think if the title is not matched completely the
hubbe
2016/04/04 22:01:49
Yep, that is exactly what happens.
hubbe
2016/04/04 22:01:49
Sounds like a good idea, done.
| |
| 14 } | |
| 8 }; | 15 }; |
| 9 | 16 |
| 10 // Compares 2 arrays of MediaKeySystemMediaCapability, comparing only | 17 // Compares 2 arrays of MediaKeySystemMediaCapability, comparing only |
| 11 // |contentType|. This assumes the order is the same. Returns "success" | 18 // |contentType|. This assumes the order is the same. Returns "success" |
| 12 // if they match, an error message if they don't. | 19 // if they match, an error message if they don't. |
| 13 function verifyCapabilitiesAreEqual(actual, expected) { | 20 function verifyCapabilitiesAreEqual(actual, expected) { |
| 14 if (actual.length != expected.length) | 21 if (actual.length != expected.length) |
| 15 return "mismatched lengths"; | 22 return "mismatched lengths"; |
| 16 for (var i = 0; i < actual.length; i++) { | 23 for (var i = 0; i < actual.length; i++) { |
| 17 // Only compare |contentType|. Other properties are ignored. | 24 // Only compare |contentType|. Other properties are ignored. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 | 88 |
| 82 function checkKeySystemWithMediaMimeType(keySystem, initDataType, | 89 function checkKeySystemWithMediaMimeType(keySystem, initDataType, |
| 83 audioCodecList, videoCodecList) { | 90 audioCodecList, videoCodecList) { |
| 84 setResultInTitle(""); | 91 setResultInTitle(""); |
| 85 requestMediaKeySystemAccessAndVerifyConfiguration( | 92 requestMediaKeySystemAccessAndVerifyConfiguration( |
| 86 keySystem, initDataType, audioCodecList, videoCodecList); | 93 keySystem, initDataType, audioCodecList, videoCodecList); |
| 87 }; | 94 }; |
| 88 </script> | 95 </script> |
| 89 </body> | 96 </body> |
| 90 </html> | 97 </html> |
| OLD | NEW |