Bug 1258015 - tabpaint test is missing target.html file. r=mconley
authorJoel Maher <jmaher@mozilla.com>
Mon, 21 Mar 2016 04:11:59 -0700
changeset 289652 73bef86f117222773ad2d06d55964915c41ad180
parent 289651 73977dc040ffd25eefd863df069ffab322d574d2
child 289653 232fda30a2ad18db9acf4c01455c427f26992627
push id30108
push usercbook@mozilla.com
push dateTue, 22 Mar 2016 11:14:31 +0000
treeherdermozilla-central@ea6298e1b4f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1258015
milestone48.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
Bug 1258015 - tabpaint test is missing target.html file. r=mconley MozReview-Commit-ID: AlK80UiqNyv
testing/talos/talos/tests/tabpaint/content/target.html
testing/talos/talos/tests/tabpaint/tabpaint.manifest.develop
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
deleted file mode 100644
--- a/testing/talos/talos/tests/tabpaint/tabpaint.manifest.develop
+++ /dev/null
@@ -1,1 +0,0 @@
-% chrome://tabpaint/content/tabpaint.html#auto