Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoints-in-anonymous-script-with-two-targets.html

Issue 2898473002: [DevTools] breakpoint manager should be ready for location from different model (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoints-in-anonymous-script-with-two-targets.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoints-in-anonymous-script-with-two-targets.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoints-in-anonymous-script-with-two-targets.html
new file mode 100644
index 0000000000000000000000000000000000000000..57d08474b6cc144561f895574225c7a41fcce07d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoints-in-anonymous-script-with-two-targets.html
@@ -0,0 +1,46 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+function testFunction()
+{
+ var workerScript = `
+ eval("function foo() {}");
+ postMessage("ready")`;
+ var blob = new Blob([workerScript], { type: "text/javascript" });
+ worker = new Worker(URL.createObjectURL(blob));
+ worker.onmessage = () => {
+ eval("debugger;" + "\n".repeat(10) + "function foo() { }");
+ }
+}
+
+async function test()
+{
+ await InspectorTest.startDebuggerTestPromise();
+ InspectorTest.evaluateInPageWithTimeout("testFunction()");
+ var sourceFrame = await waitForPausedUISourceCode();
+ InspectorTest.createNewBreakpoint(sourceFrame, 10, "", true);
+ await InspectorTest.waitJavaScriptSourceFrameBreakpoints(sourceFrame);
+ await InspectorTest.dumpJavaScriptSourceFrameBreakpoints(sourceFrame);
+ InspectorTest.completeDebuggerTest();
+
+ function waitForPausedUISourceCode() {
+ return new Promise(resolve => {
+ InspectorTest.addSniffer(Sources.JavaScriptSourceFrame.prototype, "setExecutionLocation", function() {
+ InspectorTest.showUISourceCodePromise(this.uiSourceCode()).then(() => {
+ resolve(this);
+ });
+ });
+ });
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>Tests that breakpoints work in anonymous scripts with >1 targets.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoints-in-anonymous-script-with-two-targets-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698