Bug 1538056 Part 4 - Add test for setting column breakpoints in inline scripts, r=loganfsmyth.

Differential Revision: https://phabricator.services.mozilla.com/D33188

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Hackett 2019-08-04 21:40:20 +00:00
parent 94624944d0
commit 97a8b6a8cd
3 changed files with 28 additions and 0 deletions

View File

@ -147,6 +147,7 @@ skip-if = (os == 'linux' && debug) || (os == 'linux' && asan) || ccov #Bug 1456
[browser_dbg-sourceURL-breakpoint.js]
[browser_dbg-old-breakpoint.js]
[browser_dbg-idb-run-to-completion.js]
[browser_dbg-inline-script-offset.js]
[browser_dbg-scopes-xrays.js]
[browser_dbg-merge-scopes.js]
[browser_dbg-message-run-to-completion.js]

View File

@ -0,0 +1,21 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
"use strict";
// Test that breakpoints work when set in inline scripts that do not start at column 0.
// Debugger operations may still be in progress when we navigate.
const { PromiseTestUtils } = ChromeUtils.import(
"resource://testing-common/PromiseTestUtils.jsm"
);
PromiseTestUtils.whitelistRejectionsGlobally(/Page has navigated/);
add_task(async function() {
const dbg = await initDebugger("doc-inline-script-offset.html");
await addBreakpoint(dbg, "doc-inline-script-offset.html", 6, 66);
await reload(dbg);
await waitForPaused(dbg);
ok(true, "paused after reloading at column breakpoint");
});

View File

@ -0,0 +1,6 @@
<script>
function f() {
return { g: () => {} };
}
</script>
<span>Here is some random stuff</span><script>function z() { this.f().g() } z();</script>