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 289711 73bef86f117222773ad2d06d55964915c41ad180
parent 289710 73977dc040ffd25eefd863df069ffab322d574d2
child 289712 232fda30a2ad18db9acf4c01455c427f26992627
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1258015
milestone48.0a1
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