mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-18 10:23:08 +09:00
Since these are just interpreted comments, there's 0 impact on actual code. This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are a few others scattered around which will be removed manually in a second part.
34 lines
1,019 B
JavaScript
34 lines
1,019 B
JavaScript
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
/**
|
|
* Make sure iframe scripts don't disappear after few reloads (bug 1259743)
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
const IFRAME_URL = "data:text/html;charset=utf-8," +
|
|
"<script>function fn() { console.log('hello'); }</script>" +
|
|
"<div onclick='fn()'>hello</div>";
|
|
const TAB_URL = `data:text/html;charset=utf-8,<iframe src="${IFRAME_URL}"/>`;
|
|
|
|
add_task(function* () {
|
|
let [,, panel] = yield initDebugger();
|
|
let dbg = panel.panelWin;
|
|
let newSource;
|
|
|
|
newSource = waitForDebuggerEvents(panel, dbg.EVENTS.NEW_SOURCE);
|
|
reload(panel, TAB_URL);
|
|
yield newSource;
|
|
ok(true, "Source event fired on initial load");
|
|
|
|
for (let i = 0; i < 5; i++) {
|
|
newSource = waitForDebuggerEvents(panel, dbg.EVENTS.NEW_SOURCE);
|
|
reload(panel);
|
|
yield newSource;
|
|
ok(true, `Source event fired after ${i + 1} reloads`);
|
|
}
|
|
|
|
yield closeDebuggerAndFinish(panel);
|
|
});
|