Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 const URL = "data:text/html;charset=utf8,<p>JavaScript Profiler test</p>";
6 let gTab, gPanel;
8 function test() {
9 waitForExplicitFinish();
11 setUp(URL, function (tab, browser, panel) {
12 gTab = tab;
13 gPanel = panel;
15 let record = gPanel.controls.record;
17 gPanel.once("started", () => {
18 gPanel.once("stopped", () => {
19 let [ win, doc ] = getProfileInternals(gPanel.activeProfile.uid);
21 let expl = "<script>function f() {}</script></textarea><img/src='about:logo'>";
22 let expl2 = "<script>function f() {}</script></pre><img/src='about:logo'>";
24 is(win.escapeHTML(expl),
25 "<script>function f() {}</script></textarea><img/src='about:logo'>");
27 is(win.escapeHTML(expl2),
28 "<script>function f() {}</script></pre><img/src='about:logo'>");
30 tearDown(gTab, () => {
31 gTab = null;
32 gPanel = null;
33 });
34 });
36 setTimeout(() => {
37 record.click();
38 }, 50);
39 });
41 record.click();
42 });
43 }