author | Joel Maher <jmaher@mozilla.com> |
Mon, 21 Mar 2016 04:11:59 -0700 | |
changeset 289652 | 73bef86f117222773ad2d06d55964915c41ad180 |
parent 289651 | 73977dc040ffd25eefd863df069ffab322d574d2 |
child 289653 | 232fda30a2ad18db9acf4c01455c427f26992627 |
push id | 30108 |
push user | cbook@mozilla.com |
push date | Tue, 22 Mar 2016 11:14:31 +0000 |
treeherder | mozilla-central@ea6298e1b4f7 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mconley |
bugs | 1258015 |
milestone | 48.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
new file mode 100644 --- /dev/null +++ b/testing/talos/talos/tests/tabpaint/content/target.html @@ -0,0 +1,37 @@ +<html> +<head> +<title>TABPAINT</title> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8"></meta> +</head> +<body> +<p>TABPAINT</p> +</body> +<script> + const { classes: Cc, interfaces: Ci } = Components; + + /** + * When this page is loaded, we expect a search string to be + * appended with the "starting time" (in ms) of when the tab + * was opened. + * + * Example: target.htmml?1457063506846 + */ + addEventListener("load", function onLoad() { + removeEventListener("load", onLoad); + addEventListener("MozAfterPaint", function onPaint() { + let presented = Date.now(); + removeEventListener("MozAfterPaint", onPaint); + + let opened = parseInt(location.search.substring(1), 10); + let delta = presented - opened; + + let mm = window.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIContentFrameMessageManager); + + mm.sendAsyncMessage("TabPaint:Painted", { delta }); + }); + }); +</script> +</html> \ No newline at end of file