зеркало из https://github.com/mozilla/gecko-dev.git
Bug 896139 - Breakpoints not triggering when reloading script;r=jimb
This commit is contained in:
Родитель
e47a855193
Коммит
e1a73c0076
|
@ -16,6 +16,7 @@ support-files =
|
|||
code_blackboxing_two.js
|
||||
code_breakpoints-break-on-last-line-of-script-on-reload.js
|
||||
code_breakpoints-other-tabs.js
|
||||
code_bug-896139.js
|
||||
code_frame-script.js
|
||||
code_function-search-01.js
|
||||
code_function-search-02.js
|
||||
|
@ -47,6 +48,7 @@ support-files =
|
|||
doc_breakpoints-break-on-last-line-of-script-on-reload.html
|
||||
doc_breakpoints-other-tabs.html
|
||||
doc_breakpoints-reload.html
|
||||
doc_bug-896139.html
|
||||
doc_closures.html
|
||||
doc_closure-optimized-out.html
|
||||
doc_cmd-break.html
|
||||
|
@ -164,6 +166,8 @@ skip-if = e10s && debug
|
|||
skip-if = e10s && debug
|
||||
[browser_dbg_breakpoints-reload.js]
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_bug-896139.js]
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_chrome-create.js]
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_chrome-debugging.js]
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Bug 896139 - Breakpoints not triggering when reloading script.
|
||||
*/
|
||||
|
||||
const TAB_URL = "doc_bug-896139.html";
|
||||
const SCRIPT_URL = "code_bug-896139.js";
|
||||
|
||||
function test() {
|
||||
Task.spawn(function* () {
|
||||
function testBreakpoint() {
|
||||
let promise = waitForDebuggerEvents(panel, win.EVENTS.FETCHED_SCOPES);
|
||||
callInTab(tab, "f");
|
||||
return promise.then(() => doResume(panel));
|
||||
}
|
||||
|
||||
let [tab,, panel] = yield initDebugger(EXAMPLE_URL + TAB_URL);
|
||||
let win = panel.panelWin;
|
||||
yield waitForSourceShown(panel, SCRIPT_URL);
|
||||
yield panel.addBreakpoint({
|
||||
actor: getSourceActor(win.DebuggerView.Sources, EXAMPLE_URL + SCRIPT_URL),
|
||||
line: 3
|
||||
});
|
||||
|
||||
yield testBreakpoint();
|
||||
yield reloadActiveTab(panel, win.EVENTS.SOURCE_SHOWN);
|
||||
yield testBreakpoint();
|
||||
|
||||
yield closeDebuggerAndFinish(panel);
|
||||
});
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
|
||||
function f() {
|
||||
var a = 1;
|
||||
var b = 2;
|
||||
var c = 3;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
var script = document.createElement("script");
|
||||
script.setAttribute("src", "code_bug-896139.js");
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче