<!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html>
<head>
<script src="resource://talos-powers/TalosPowersContent.js"></script>
<script src="resource://talos-powers/TalosContentProfiler.js"></script>
<script language="javascript" type="text/javascript">
const MEASUREMENT1_MS = 3000;
const MEASUREMENT2_MS = 2000;
const PLAYBACK_RATE = 5; var vdo; var start1 = 0; var paintedFramesStart1 = 0; var start2 = 0; var paintedFramesStart2 = 0; var testIndex = 0; var test = [ "testsrc.240p.120fps.mp4", "testsrc.480p.60fps.webm", "testsrc.1080p.60fps.mp4",
]; var viewModeIndex = 0;
// Remove fullscreen mode since it causes intermittent failures on try server. See bug 1192317. var viewMode = [1, 1.1, 2]; var testResult = {names: [], values: []};
/* globals readyToStart:true */
function init() {
TalosPowersContent.focus(content_focused);
}
function fullscreen() {
if ((document.fullscreenElement && document.fullscreenElement !== null) ||
document.mozFullScreen) {
startTest();
} else {
nextTest();
}
}
function runTest() {
// Windows XP cannot play mp4 clip due to the lack of gmp-eme-plugin, so skip it.
if (window.navigator.oscpu == "Windows NT 5.1" && test[testIndex].includes("mp4")) {
nextTest();
}
vdo.setAttribute("src", "clips/" + test[testIndex]);
vdo.load();
}
function nextTest() {
viewModeIndex++;
if (viewModeIndex >= viewMode.length) {
viewModeIndex = 0;
testIndex++;
}
if (testIndex >= test.length) {
// End the test
reportResult();
} else {
runTest();
}
}
function reportResult() { var msg = "";
for (var i = 0; i < testResult.names.length; i++) {
msg += testResult.names[i] + " = " + testResult.values[i] + " ms/frame\n\n";
}
dump(msg); // Put the readable report at talos run-log
if (window.tpRecordTime) {
// Within talos - report the results
return tpRecordTime(testResult.values.join(","), 0, testResult.names.join(","));
}
// Local run in a plain browser, display the formatted report
alert(msg);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.