mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
const URL = "data:text/html;charset=utf8,<p>JavaScript Profiler test</p>";
|
|
|
|
let gTab, gPanel;
|
|
|
|
function test() {
|
|
waitForExplicitFinish();
|
|
|
|
setUp(URL, function (tab, browser, panel) {
|
|
gTab = tab;
|
|
gPanel = panel;
|
|
|
|
let record = gPanel.controls.record;
|
|
|
|
gPanel.once("started", () => {
|
|
gPanel.once("stopped", () => {
|
|
let [ win, doc ] = getProfileInternals(gPanel.activeProfile.uid);
|
|
|
|
let expl = "<script>function f() {}</script></textarea><img/src='about:logo'>";
|
|
let expl2 = "<script>function f() {}</script></pre><img/src='about:logo'>";
|
|
|
|
is(win.escapeHTML(expl),
|
|
"<script>function f() {}</script></textarea><img/src='about:logo'>");
|
|
|
|
is(win.escapeHTML(expl2),
|
|
"<script>function f() {}</script></pre><img/src='about:logo'>");
|
|
|
|
tearDown(gTab, () => {
|
|
gTab = null;
|
|
gPanel = null;
|
|
});
|
|
});
|
|
|
|
setTimeout(() => {
|
|
record.click();
|
|
}, 50);
|
|
});
|
|
|
|
record.click();
|
|
});
|
|
} |