Bug 1258015 - tabpaint test is missing target.html file. r=mconley

MozReview-Commit-ID: AlK80UiqNyv

--HG--
extra : rebase_source : 100ee53cffe3a105db47290285a0d27fe9bfd838
This commit is contained in:
Joel Maher 2016-03-21 04:11:59 -07:00
Родитель 8e668102a1
Коммит 6aa06a6736
2 изменённых файлов: 37 добавлений и 1 удалений

Просмотреть файл

@ -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>

Просмотреть файл

@ -1 +0,0 @@
% chrome://tabpaint/content/tabpaint.html#auto