REGRESSION (r242741) [Mac WK1 Debug] Layout Test inspector/timeline/exception-in...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 May 2019 22:36:34 +0000 (22:36 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 May 2019 22:36:34 +0000 (22:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197442
<rdar://problem/50354090>

Reviewed by Joseph Pecoraro.

Ever since r198774, we don't allow a timeline recording to be active at the same time as the
debugger being paused. As such, these tests are unnecessary.

* inspector/timeline/debugger-paused-while-recording.html: Removed.
* inspector/timeline/debugger-paused-while-recording-expected.txt: Removed.
* inspector/timeline/exception-in-injected-script-while-recording.html: Removed.
* inspector/timeline/exception-in-injected-script-while-recording-expected.txt: Removed.
* inspector/timeline/resources/timeline-helper.js: Removed.
* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245362 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/inspector/timeline/debugger-paused-while-recording-expected.txt [deleted file]
LayoutTests/inspector/timeline/debugger-paused-while-recording.html [deleted file]
LayoutTests/inspector/timeline/exception-in-injected-script-while-recording-expected.txt [deleted file]
LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html [deleted file]
LayoutTests/inspector/timeline/resources/timeline-helper.js [deleted file]

index 976a1a0..d7439ac 100644 (file)
@@ -1,3 +1,21 @@
+2019-05-15  Devin Rousso  <drousso@apple.com>
+
+        REGRESSION (r242741) [Mac WK1 Debug] Layout Test inspector/timeline/exception-in-injected-script-while-recording.html is a flaky crash
+        https://bugs.webkit.org/show_bug.cgi?id=197442
+        <rdar://problem/50354090>
+
+        Reviewed by Joseph Pecoraro.
+
+        Ever since r198774, we don't allow a timeline recording to be active at the same time as the
+        debugger being paused. As such, these tests are unnecessary.
+
+        * inspector/timeline/debugger-paused-while-recording.html: Removed.
+        * inspector/timeline/debugger-paused-while-recording-expected.txt: Removed.
+        * inspector/timeline/exception-in-injected-script-while-recording.html: Removed.
+        * inspector/timeline/exception-in-injected-script-while-recording-expected.txt: Removed.
+        * inspector/timeline/resources/timeline-helper.js: Removed.
+        * TestExpectations:
+
 2019-05-15  Zalan Bujtas  <zalan@apple.com>
 
         Do not create a shape object outside of the layout context
index 2a348f7..bc1ce8b 100644 (file)
@@ -534,9 +534,6 @@ webkit.org/b/129639 inspector/dom/dom-search-crash.html [ Skip ]
 webkit.org/b/128736 inspector/debugger/setBreakpoint-dfg.html [ Failure Pass ]
 webkit.org/b/134982 inspector/debugger/setBreakpoint-dfg-and-modify-local.html [ Failure Pass ]
 
-webkit.org/b/142208 inspector/timeline/debugger-paused-while-recording.html [ Skip ]
-webkit.org/b/142208 inspector/timeline/exception-in-injected-script-while-recording.html [ Skip ]
-
 # This test is fast enough in release but quite slow in debug builds.
 [ Debug ] inspector/debugger/debugger-stack-overflow.html [ Skip ]
 [ Debug ] inspector/canvas/recording-2d.html [ Slow ]
diff --git a/LayoutTests/inspector/timeline/debugger-paused-while-recording-expected.txt b/LayoutTests/inspector/timeline/debugger-paused-while-recording-expected.txt
deleted file mode 100644 (file)
index c01db32..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Testing that profiling data is correctly generated and attached to Timeline records when the debugger pauses and resumes while capturing timelines.
-
-Added a breakpoint inside hook().
-Debugger paused; resuming...
-Debugger resumed; stopping timeline capture.
-Timeline capturing stopped. Inspecting the active recording....
-TimerFired timeline record has profile attached: TRUE
-
diff --git a/LayoutTests/inspector/timeline/debugger-paused-while-recording.html b/LayoutTests/inspector/timeline/debugger-paused-while-recording.html
deleted file mode 100644 (file)
index 915ab09..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'">
-<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
-<script src="./resources/timeline-helper.js"></script>
-<script>
-function installTimer()
-{
-    setTimeout(function() {
-        callFunction(mul, add(1, 3), 3);
-        hook();
-    });
-}
-
-function add(a, b)
-{
-    TestPage.addResult("Calling add(): " + a + " + " + b);
-    return a + b;
-}
-
-function mul(a, b)
-{
-    TestPage.addResult("Calling mul(): " + a + " * " + b);
-    return a * b;
-}
-
-function test()
-{
-    // First, set up the breakpoint, start timeline capturing, and trigger execution of installTimer().
-    WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.ScriptAdded, function(event) {
-        var scriptObject = event.data.script;
-
-        if (!/timeline-helper\.js$/.test(scriptObject.url))
-            return;
-
-        var location = scriptObject.createSourceCodeLocation(17, 0);  // Inside timeline-helper.js:hook()
-        var breakpoint = new WI.Breakpoint(location);
-        WI.debuggerManager.addBreakpoint(breakpoint);
-        InspectorTest.addResult("Added a breakpoint inside hook().")
-
-        WI.timelineManager.startCapturing();
-        InspectorTest.evaluateInPage("installTimer()");
-    });
-
-    // Second, the debugger will pause during timeline capturing. Resume, then stop timeline capturing.
-    WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.Paused, function(event) {
-            InspectorTest.addResult("Debugger paused; resuming...");
-
-            WI.debuggerManager.resume().then(function() {
-                InspectorTest.addResult("Debugger resumed; stopping timeline capture.");
-                WI.timelineManager.stopCapturing();
-            })
-    });
-
-    // When timeline capturing stops, inspect the resulting timeline records for a profile.
-    WI.timelineManager.addEventListener(WI.TimelineManager.Event.CapturingStateChanged, (event) => {
-        if (WI.timelineManager.capturingState !== WI.TimelineManager.CapturingState.Inactive)
-            return;
-
-        var recording = WI.timelineManager.activeRecording;
-        var scriptTimeline = recording.timelines.get(WI.TimelineRecord.Type.Script);
-        console.assert(scriptTimeline);
-
-        InspectorTest.addResult("Timeline capturing stopped. Inspecting the active recording....");
-
-        for (var record of scriptTimeline.records) {
-            if (record.eventType !== WI.ScriptTimelineRecord.EventType.TimerFired)
-                continue;
-
-            var result = record.profile ? "TRUE" : "FALSE";
-            InspectorTest.addResult("TimerFired timeline record has profile attached: " + result);
-        }
-
-        InspectorTest.completeTest();
-    });
-
-    InspectorTest.reloadPage();
-}
-</script>
-</head>
-<body onload="runTest()">
-    <p>Testing that profiling data is correctly generated and attached to Timeline records when the debugger pauses and resumes while capturing timelines.</p>
-</body>
-</html>
diff --git a/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording-expected.txt b/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording-expected.txt
deleted file mode 100644 (file)
index 2a77e38..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Testing that an injected script, run while the debugger is paused and the timeline profiler is enabled, should not loop forever if it has an exception thrown.
-
-Added a breakpoint inside hook().
-Debugger paused;
-An exception was thrown from the injected script.
-Debugger resumed; stopping timeline capture.
-Timeline capturing stopped. Inspecting the active recording....
-TimerFired timeline record has profile attached: TRUE
-
diff --git a/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html b/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html
deleted file mode 100644 (file)
index 1b52bc0..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'">
-<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
-<script src="./resources/timeline-helper.js"></script>
-<script>
-function installTimer()
-{
-    setTimeout(function() {
-        callFunction(mul, add(1, 3), 3);
-        hook();
-    });
-}
-
-function add(a, b)
-{
-    TestPage.addResult("Calling add(): " + a + " + " + b);
-    return a + b;
-}
-
-function mul(a, b)
-{
-    TestPage.addResult("Calling mul(): " + a + " * " + b);
-    return a * b;
-}
-
-function test()
-{
-    // First, set up the breakpoint, start timeline capturing, and trigger execution of installTimer().
-    WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.ScriptAdded, function(event) {
-        var scriptObject = event.data.script;
-
-        if (!/timeline-helper\.js$/.test(scriptObject.url))
-            return;
-
-        var location = scriptObject.createSourceCodeLocation(17, 0);  // Inside timeline-helper.js:hook()
-        var breakpoint = new WI.Breakpoint(location);
-        WI.debuggerManager.addBreakpoint(breakpoint);
-        InspectorTest.addResult("Added a breakpoint inside hook().")
-
-        WI.timelineManager.startCapturing();
-        InspectorTest.evaluateInPage("installTimer()");
-    });
-
-    // Second, the debugger will pause during timeline capturing. Resume, then stop timeline capturing.
-    WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.Paused, function(event) {
-        InspectorTest.addResult("Debugger paused;");
-        checkIfExceptionLoopsForever();
-    });
-
-    function checkIfExceptionLoopsForever() {
-        WI.runtimeManager.evaluateInInspectedWindow("({}).x.x", {objectGroup: "test", includeCommandLineAPI: true, doNotPauseOnExceptionsAndMuteConsole: true}, function(result, wasThrown) {
-            InspectorTest.addResult("An exception was " + (wasThrown ? "" : "not ") + "thrown from the injected script.");
-            WI.debuggerManager.resume().then(function() {
-                InspectorTest.addResult("Debugger resumed; stopping timeline capture.");
-                WI.timelineManager.stopCapturing();
-            });
-        });
-    }
-
-    // When timeline capturing stops, inspect the resulting timeline records for a profile.
-    WI.timelineManager.addEventListener(WI.TimelineManager.Event.CapturingStateChanged, (event) => {
-        if (WI.timelineManager.capturingState !== WI.TimelineManager.CapturingState.Inactive)
-            return;
-
-        var recording = WI.timelineManager.activeRecording;
-        var scriptTimeline = recording.timelines.get(WI.TimelineRecord.Type.Script);
-        console.assert(scriptTimeline);
-
-        InspectorTest.addResult("Timeline capturing stopped. Inspecting the active recording....");
-
-        for (var record of scriptTimeline.records) {
-            if (record.eventType !== WI.ScriptTimelineRecord.EventType.TimerFired)
-                continue;
-
-            var result = record.profile ? "TRUE" : "FALSE";
-            InspectorTest.addResult("TimerFired timeline record has profile attached: " + result);
-        }
-
-        InspectorTest.completeTest();
-    });
-
-    InspectorTest.reloadPage();
-}
-</script>
-</head>
-<body onload="runTest()">
-    <p>Testing that an injected script, run while the debugger is paused and the timeline profiler is enabled, should not loop forever if it has an exception thrown.</p>
-</body>
-</html>
diff --git a/LayoutTests/inspector/timeline/resources/timeline-helper.js b/LayoutTests/inspector/timeline/resources/timeline-helper.js
deleted file mode 100644 (file)
index c2eaf58..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// WARNING: some tests blindly set breakpoints in this file by line number.
-// So, if you modify the code, make sure to adjust any createSourceCodeLocation
-// calls from tests in the ../ directory. Callsites should include a description
-// of the function/statement to set a breakpoint at, so that it's easy to fix them.
-
-function callFunction(fn)
-{
-    if (!(fn instanceof Function))
-        return;
-
-    var argsArray = Array.prototype.slice.call(arguments);
-    Array.prototype.splice.call(argsArray, 0, 1);
-    fn.call(this, argsArray);
-}
-
-function hook()
-{
-    return 42;
-}