Index: chrome/test/data/media/html/media_cpu_perf.html |
diff --git a/chrome/test/data/media/html/media_cpu_perf.html b/chrome/test/data/media/html/media_cpu_perf.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..89111863ceb416fba300997750e413e0f86cb58a |
--- /dev/null |
+++ b/chrome/test/data/media/html/media_cpu_perf.html |
@@ -0,0 +1,30 @@ |
+<!-- Used by media_cpu_perf to calculate CPU performance statistics. --> |
+ |
+<!DOCTYPE html> |
+<html lang="en-US"> |
+ <head> |
+ <title>CPU and Memory Perf Test</title> |
+ </head> |
+ |
+ <body> |
+ <video preload controls></video> |
+ </body> |
+ |
+ <script type="text/javascript"> |
+ var video = document.querySelector("video"); |
+ |
+ video.addEventListener("error", function() { endTest(false); }, false); |
+ video.addEventListener("ended", function() { endTest(true); }, false); |
+ |
+ function endTest(successFlag) { |
+ // Notify PyAuto that we've completed the test run. |
+ if (window.domAutomationController) |
+ window.domAutomationController.send(successFlag); |
+ } |
+ |
+ function startTest(url) { |
+ video.src = url; |
+ video.play(); |
+ } |
+ </script> |
+</html> |