Changeset 269023 in webkit


Ignore:
Timestamp:
Oct 26, 2020 11:39:08 PM (21 months ago)
Author:
Devin Rousso
Message:

Web Inspector: console command line API should be exposed to breakpoint conditions/actions
https://bugs.webkit.org/show_bug.cgi?id=218141
<rdar://problem/70636727>

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • debugger/Debugger.h:

(JSC::Debugger::Client::scopeExtensionObject): Added.

  • debugger/Debugger.cpp:

(JSC::Debugger::setClient): Added.
(JSC::Debugger::evaluateBreakpointCondition):
(JSC::Debugger::evaluateBreakpointActions):
Introduce an optional Debugger::Client virtual class that can be used to adjust behavior
in various situations. Right now it is used when evaluating breakpoint conditions/actions
to get a scope extension object.

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::internalEnable):
(Inspector::InspectorDebuggerAgent::internalDisable):
(Inspector::InspectorDebuggerAgent::scopeExtensionObject): Added.
Implement Debugger::Client and provide a newly created CommandLineAPI instance.

  • inspector/InjectedScript.h:
  • inspector/InjectedScript.cpp:

(Inspector::InjectedScript::createCommandLineAPIObject const): Added.

  • inspector/InjectedScriptSource.js:

(let.InjectedScript.prototype.createCommandLineAPIObject): Added.
(let.InjectedScript.prototype._evaluateOn):
Expose a way for the C++ to create CommandLineAPI instances.

Source/WebInspectorUI:

  • UserInterface/Controllers/CodeMirrorCompletionController.js:

(WI.CodeMirrorCompletionController):
(WI.CodeMirrorCompletionController.prototype.get mode): Added.
(WI.CodeMirrorCompletionController.prototype.get delegate): Deleted.

  • UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:

(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.shouldExposeEvent): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.shouldExposeException): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
Introduce a Mode enum that can be fetched by completion providers to adjust functionality.

  • UserInterface/Views/BreakpointPopover.js:

(WI.BreakpointPopover.appendContextMenuItems):
(WI.BreakpointPopover.prototype.show):
(WI.BreakpointPopover.prototype.breakpointActionViewCodeMirrorCompletionControllerMode): Added.
(WI.BreakpointPopover.prototype.get codeMirrorCompletionControllerMode): Added.

  • UserInterface/Views/EventBreakpointPopover.js:

(WI.EventBreakpointPopover.prototype.get codeMirrorCompletionControllerMode): Added.

  • UserInterface/Views/BreakpointActionView.js:

(WI.BreakpointActionView.prototype._updateBody):
Use a Mode that always exposes $event/$exception depending on the breakpoint type.

  • UserInterface/Views/ConsolePrompt.js:

(WI.ConsolePrompt):
Use a Mode that only exposes $event/$exception when paused for an event/exeption.

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

(WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
Use a Mode that always exposes $event/$exception since watch expressions track values
over time, and may therefore not always have an $event/$exception set.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor):
Use the default Mode that never exposes $event/$exception.

LayoutTests:

  • inspector/debugger/resources/breakpoint-options-utilities.js:
  • inspector/debugger/break-on-exception-expected.txt:
  • inspector/debugger/break-on-uncaught-exception-expected.txt:
  • inspector/debugger/setPauseOnAssertions-expected.txt:
  • inspector/debugger/setPauseOnDebuggerStatements-expected.txt:
  • inspector/debugger/setPauseOnMicrotasks-expected.txt:
  • inspector/dom-debugger/attribute-modified-style-expected.txt:
  • inspector/dom-debugger/dom-breakpoint-attribute-modified-expected.txt:
  • inspector/dom-debugger/dom-breakpoint-node-removed-ancestor-expected.txt:
  • inspector/dom-debugger/dom-breakpoint-node-removed-direct-expected.txt:
  • inspector/dom-debugger/dom-breakpoint-subtree-modified-add-expected.txt:
  • inspector/dom-debugger/dom-breakpoint-subtree-modified-remove-expected.txt:
  • inspector/dom-debugger/event-animation-frame-breakpoints-expected.txt:
  • inspector/dom-debugger/event-interval-breakpoints-expected.txt:
  • inspector/dom-debugger/event-listener-breakpoints-expected.txt:
  • inspector/dom-debugger/event-timeout-breakpoints-expected.txt:
  • inspector/dom-debugger/url-breakpoints-all-requests-expected.txt:
  • inspector/dom-debugger/url-breakpoints-containing-expected.txt:
  • inspector/dom-debugger/url-breakpoints-matching-expected.txt:
Location:
trunk
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r269021 r269023  
     12020-10-26  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: console command line API should be exposed to breakpoint conditions/actions
     4        https://bugs.webkit.org/show_bug.cgi?id=218141
     5        <rdar://problem/70636727>
     6
     7        Reviewed by Brian Burg.
     8
     9        * inspector/debugger/resources/breakpoint-options-utilities.js:
     10        * inspector/debugger/break-on-exception-expected.txt:
     11        * inspector/debugger/break-on-uncaught-exception-expected.txt:
     12        * inspector/debugger/setPauseOnAssertions-expected.txt:
     13        * inspector/debugger/setPauseOnDebuggerStatements-expected.txt:
     14        * inspector/debugger/setPauseOnMicrotasks-expected.txt:
     15        * inspector/dom-debugger/attribute-modified-style-expected.txt:
     16        * inspector/dom-debugger/dom-breakpoint-attribute-modified-expected.txt:
     17        * inspector/dom-debugger/dom-breakpoint-node-removed-ancestor-expected.txt:
     18        * inspector/dom-debugger/dom-breakpoint-node-removed-direct-expected.txt:
     19        * inspector/dom-debugger/dom-breakpoint-subtree-modified-add-expected.txt:
     20        * inspector/dom-debugger/dom-breakpoint-subtree-modified-remove-expected.txt:
     21        * inspector/dom-debugger/event-animation-frame-breakpoints-expected.txt:
     22        * inspector/dom-debugger/event-interval-breakpoints-expected.txt:
     23        * inspector/dom-debugger/event-listener-breakpoints-expected.txt:
     24        * inspector/dom-debugger/event-timeout-breakpoints-expected.txt:
     25        * inspector/dom-debugger/url-breakpoints-all-requests-expected.txt:
     26        * inspector/dom-debugger/url-breakpoints-containing-expected.txt:
     27        * inspector/dom-debugger/url-breakpoints-matching-expected.txt:
     28
    1292020-10-26  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    230
  • trunk/LayoutTests/inspector/debugger/break-on-exception-expected.txt

    r266534 r269023  
    5050
    5151Setting condition to 'true'...
     52
     53Triggering breakpoint...
     54PASS: Should pause.
     55
     56Triggering breakpoint...
     57PASS: Should pause.
     58
     59-- Running test case: BreakOnAnyException.Options.Condition.ConsoleCommandLineAPI
     60Adding saved console value 'false'...
     61
     62Setting condition to saved console value...
     63
     64Triggering breakpoint...
     65PASS: Should not pause.
     66
     67Triggering breakpoint...
     68PASS: Should not pause.
     69
     70Adding saved console value 'true'...
     71Setting condition to saved console value...
    5272
    5373Triggering breakpoint...
     
    127147PASS: Should not pause.
    128148
     149-- Running test case: BreakOnAnyException.Options.Actions.Evaluate.ConsoleCommandLineAPI
     150Adding saved console value '1'...
     151
     152Adding evaluate action using saved console value...
     153
     154Triggering breakpoint...
     155PASS: Should execute breakpoint action.
     156PASS: Should pause.
     157
     158Adding saved console value '2'...
     159Editing evaluate action using saved console value...
     160
     161Triggering breakpoint...
     162PASS: Should execute breakpoint action.
     163PASS: Should pause.
     164
     165Adding saved console value '3'...
     166Editing evaluate action using saved console value...
     167Enabling auto-continue...
     168
     169Triggering breakpoint...
     170PASS: Should execute breakpoint action.
     171PASS: Should not pause.
     172
     173Adding saved console value '4'...
     174Editing evaluate action using saved console value...
     175
     176Triggering breakpoint...
     177PASS: Should execute breakpoint action.
     178PASS: Should not pause.
     179
  • trunk/LayoutTests/inspector/debugger/break-on-uncaught-exception-expected.txt

    r266534 r269023  
    4949
    5050Setting condition to 'true'...
     51
     52Triggering breakpoint...
     53PASS: Should pause.
     54
     55Triggering breakpoint...
     56PASS: Should pause.
     57
     58-- Running test case: BreakOnUncaughtException.Options.Condition.ConsoleCommandLineAPI
     59Adding saved console value 'false'...
     60
     61Setting condition to saved console value...
     62
     63Triggering breakpoint...
     64PASS: Should not pause.
     65
     66Triggering breakpoint...
     67PASS: Should not pause.
     68
     69Adding saved console value 'true'...
     70Setting condition to saved console value...
    5171
    5272Triggering breakpoint...
     
    126146PASS: Should not pause.
    127147
     148-- Running test case: BreakOnUncaughtException.Options.Actions.Evaluate.ConsoleCommandLineAPI
     149Adding saved console value '1'...
     150
     151Adding evaluate action using saved console value...
     152
     153Triggering breakpoint...
     154PASS: Should execute breakpoint action.
     155PASS: Should pause.
     156
     157Adding saved console value '2'...
     158Editing evaluate action using saved console value...
     159
     160Triggering breakpoint...
     161PASS: Should execute breakpoint action.
     162PASS: Should pause.
     163
     164Adding saved console value '3'...
     165Editing evaluate action using saved console value...
     166Enabling auto-continue...
     167
     168Triggering breakpoint...
     169PASS: Should execute breakpoint action.
     170PASS: Should not pause.
     171
     172Adding saved console value '4'...
     173Editing evaluate action using saved console value...
     174
     175Triggering breakpoint...
     176PASS: Should execute breakpoint action.
     177PASS: Should not pause.
     178
  • trunk/LayoutTests/inspector/debugger/resources/breakpoint-options-utilities.js

    r266669 r269023  
    5757        });
    5858
     59        suite.addTestCase({
     60            name: suite.name + "." + testCaseNamePrefix + "Options.Condition.ConsoleCommandLineAPI",
     61            description: "Check the console command line API is exposed to the breakpoint condition.",
     62            async test() {
     63                let pauseCount = 0;
     64
     65                let pausedListener = WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.Paused, (event) => {
     66                    ++pauseCount;
     67                    WI.debuggerManager.resume();
     68                });
     69
     70                InspectorTest.log("Adding saved console value 'false'...");
     71                let firstEvaluateResult = await RuntimeAgent.evaluate.invoke({
     72                    expression: "false",
     73                    objectGroup: "test",
     74                    includeCommandLineAPI: true,
     75                    doNotPauseOnExceptionsAndMuteConsole: true,
     76                    saveResult: true,
     77                });
     78                InspectorTest.assert(!firstEvaluateResult.wasThrown, "Should not throw.");
     79                InspectorTest.assert(firstEvaluateResult.savedResultIndex, "Should have saved result index.");
     80
     81                let breakpoint = await createBreakpoint();
     82
     83                InspectorTest.newline();
     84
     85                InspectorTest.log("Setting condition to saved console value...");
     86                breakpoint.condition = "$" + firstEvaluateResult.savedResultIndex;
     87
     88                for (let i = 1; i <= 4; ++i) {
     89                    if (i === 3) {
     90                        InspectorTest.newline();
     91
     92                        InspectorTest.log("Adding saved console value 'true'...");
     93                        let secondEvaluateResult = await RuntimeAgent.evaluate.invoke({
     94                            expression: "true",
     95                            objectGroup: "test",
     96                            includeCommandLineAPI: true,
     97                            doNotPauseOnExceptionsAndMuteConsole: true,
     98                            saveResult: true,
     99                        });
     100                        InspectorTest.assert(!secondEvaluateResult.wasThrown, "Should not throw.");
     101                        InspectorTest.assert(secondEvaluateResult.savedResultIndex, "Should have saved result index.");
     102
     103                        InspectorTest.log("Setting condition to saved console value...");
     104                        breakpoint.condition = "$" + secondEvaluateResult.savedResultIndex;
     105                    }
     106
     107                    InspectorTest.newline();
     108
     109                    InspectorTest.log("Triggering breakpoint...");
     110                    await triggerBreakpoint(breakpoint);
     111
     112                    if (i <= 2)
     113                        InspectorTest.expectEqual(pauseCount, 0, "Should not pause.");
     114                    else
     115                        InspectorTest.expectEqual(pauseCount, i - 2, "Should pause.");
     116                }
     117
     118                removeBreakpoint(breakpoint);
     119
     120                WI.debuggerManager.removeEventListener(WI.DebuggerManager.Event.Paused, pausedListener);
     121            },
     122        });
     123
    59124        if (!skip?.ignoreCount) {
    60125            suite.addTestCase({
     
    205270            },
    206271        });
     272
     273        suite.addTestCase({
     274            name: suite.name + "." + testCaseNamePrefix + "Options.Actions.Evaluate.ConsoleCommandLineAPI",
     275            description: "Check the console command line API is exposed to breakpoint actions.",
     276            async test() {
     277                let pauseCount = 0;
     278
     279                let pausedListener = WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.Paused, (event) => {
     280                    ++pauseCount;
     281                    WI.debuggerManager.resume();
     282                });
     283
     284                InspectorTest.log("Adding saved console value '1'...");
     285                let firstEvaluateResult = await RuntimeAgent.evaluate.invoke({
     286                    expression: "1",
     287                    objectGroup: "test",
     288                    includeCommandLineAPI: true,
     289                    doNotPauseOnExceptionsAndMuteConsole: true,
     290                    saveResult: true,
     291                });
     292                InspectorTest.assert(!firstEvaluateResult.wasThrown, "Should not throw.");
     293                InspectorTest.assert(firstEvaluateResult.savedResultIndex, "Should have saved result index.");
     294
     295                let breakpoint = await createBreakpoint();
     296
     297                InspectorTest.newline();
     298
     299                InspectorTest.log("Adding evaluate action using saved console value...");
     300                let action = new WI.BreakpointAction(WI.BreakpointAction.Type.Evaluate, {data: `window.BREAKPOINT_ACTION_EVALUATE = $${firstEvaluateResult.savedResultIndex};`});
     301                breakpoint.addAction(action);
     302
     303                for (let i = 1; i <= 4; ++i) {
     304                    if (i > 1) {
     305                        InspectorTest.newline();
     306
     307                        InspectorTest.log(`Adding saved console value '${i}'...`);
     308                        let secondEvaluateResult = await RuntimeAgent.evaluate.invoke({
     309                            expression: String(i),
     310                            objectGroup: "test",
     311                            includeCommandLineAPI: true,
     312                            doNotPauseOnExceptionsAndMuteConsole: true,
     313                            saveResult: true,
     314                        });
     315                        InspectorTest.assert(!secondEvaluateResult.wasThrown, "Should not throw.");
     316                        InspectorTest.assert(secondEvaluateResult.savedResultIndex, "Should have saved result index.");
     317
     318                        InspectorTest.log("Editing evaluate action using saved console value...");
     319                        action.data = `window.BREAKPOINT_ACTION_EVALUATE = $${secondEvaluateResult.savedResultIndex};`;
     320
     321                        if (i === 3) {
     322                            InspectorTest.log("Enabling auto-continue...");
     323                            breakpoint.autoContinue = true;
     324                        }
     325                    }
     326
     327                    InspectorTest.newline();
     328
     329                    InspectorTest.log("Triggering breakpoint...");
     330                    await triggerBreakpoint(breakpoint);
     331
     332                    let breakpointActionEvaluateResult = await InspectorTest.evaluateInPage(`window.BREAKPOINT_ACTION_EVALUATE`);
     333                    InspectorTest.expectEqual(breakpointActionEvaluateResult, i, "Should execute breakpoint action.");
     334
     335                    if (i <= 2)
     336                        InspectorTest.expectEqual(pauseCount, i, "Should pause.");
     337                    else
     338                        InspectorTest.expectEqual(pauseCount, 2, "Should not pause.");
     339                }
     340
     341                removeBreakpoint(breakpoint);
     342
     343                WI.debuggerManager.removeEventListener(WI.DebuggerManager.Event.Paused, pausedListener);
     344            },
     345        });
    207346    };
    208347});
  • trunk/LayoutTests/inspector/debugger/setPauseOnAssertions-expected.txt

    r266534 r269023  
     1CONSOLE MESSAGE: Failing assertion
     2CONSOLE MESSAGE: Failing assertion
     3CONSOLE MESSAGE: Failing assertion
     4CONSOLE MESSAGE: Failing assertion
    15CONSOLE MESSAGE: Failing assertion
    26CONSOLE MESSAGE: Failing assertion
     
    1620CONSOLE MESSAGE: Failing assertion
    1721CONSOLE MESSAGE: BREAKPOINT ACTION LOG 4
     22CONSOLE MESSAGE: Failing assertion
     23CONSOLE MESSAGE: Failing assertion
     24CONSOLE MESSAGE: Failing assertion
     25CONSOLE MESSAGE: Failing assertion
    1826CONSOLE MESSAGE: Failing assertion
    1927CONSOLE MESSAGE: Failing assertion
     
    4250
    4351Setting condition to 'true'...
     52
     53Triggering breakpoint...
     54PASS: Should pause.
     55
     56Triggering breakpoint...
     57PASS: Should pause.
     58
     59-- Running test case: Debugger.setPauseOnAssertions.Options.Condition.ConsoleCommandLineAPI
     60Adding saved console value 'false'...
     61
     62Setting condition to saved console value...
     63
     64Triggering breakpoint...
     65PASS: Should not pause.
     66
     67Triggering breakpoint...
     68PASS: Should not pause.
     69
     70Adding saved console value 'true'...
     71Setting condition to saved console value...
    4472
    4573Triggering breakpoint...
     
    119147PASS: Should not pause.
    120148
     149-- Running test case: Debugger.setPauseOnAssertions.Options.Actions.Evaluate.ConsoleCommandLineAPI
     150Adding saved console value '1'...
     151
     152Adding evaluate action using saved console value...
     153
     154Triggering breakpoint...
     155PASS: Should execute breakpoint action.
     156PASS: Should pause.
     157
     158Adding saved console value '2'...
     159Editing evaluate action using saved console value...
     160
     161Triggering breakpoint...
     162PASS: Should execute breakpoint action.
     163PASS: Should pause.
     164
     165Adding saved console value '3'...
     166Editing evaluate action using saved console value...
     167Enabling auto-continue...
     168
     169Triggering breakpoint...
     170PASS: Should execute breakpoint action.
     171PASS: Should not pause.
     172
     173Adding saved console value '4'...
     174Editing evaluate action using saved console value...
     175
     176Triggering breakpoint...
     177PASS: Should execute breakpoint action.
     178PASS: Should not pause.
     179
  • trunk/LayoutTests/inspector/debugger/setPauseOnDebuggerStatements-expected.txt

    r266534 r269023  
    2424
    2525Setting condition to 'true'...
     26
     27Triggering breakpoint...
     28PASS: Should pause.
     29
     30Triggering breakpoint...
     31PASS: Should pause.
     32
     33-- Running test case: Debugger.setPauseOnDebuggerStatements.Options.Condition.ConsoleCommandLineAPI
     34Adding saved console value 'false'...
     35
     36Setting condition to saved console value...
     37
     38Triggering breakpoint...
     39PASS: Should not pause.
     40
     41Triggering breakpoint...
     42PASS: Should not pause.
     43
     44Adding saved console value 'true'...
     45Setting condition to saved console value...
    2646
    2747Triggering breakpoint...
     
    101121PASS: Should not pause.
    102122
     123-- Running test case: Debugger.setPauseOnDebuggerStatements.Options.Actions.Evaluate.ConsoleCommandLineAPI
     124Adding saved console value '1'...
     125
     126Adding evaluate action using saved console value...
     127
     128Triggering breakpoint...
     129PASS: Should execute breakpoint action.
     130PASS: Should pause.
     131
     132Adding saved console value '2'...
     133Editing evaluate action using saved console value...
     134
     135Triggering breakpoint...
     136PASS: Should execute breakpoint action.
     137PASS: Should pause.
     138
     139Adding saved console value '3'...
     140Editing evaluate action using saved console value...
     141Enabling auto-continue...
     142
     143Triggering breakpoint...
     144PASS: Should execute breakpoint action.
     145PASS: Should not pause.
     146
     147Adding saved console value '4'...
     148Editing evaluate action using saved console value...
     149
     150Triggering breakpoint...
     151PASS: Should execute breakpoint action.
     152PASS: Should not pause.
     153
  • trunk/LayoutTests/inspector/debugger/setPauseOnMicrotasks-expected.txt

    r266534 r269023  
    3636
    3737Setting condition to 'true'...
     38
     39Triggering breakpoint...
     40PASS: Should pause.
     41
     42Triggering breakpoint...
     43PASS: Should pause.
     44
     45-- Running test case: Debugger.setPauseOnMicrotasks.Options.Condition.ConsoleCommandLineAPI
     46Adding saved console value 'false'...
     47
     48Setting condition to saved console value...
     49
     50Triggering breakpoint...
     51PASS: Should not pause.
     52
     53Triggering breakpoint...
     54PASS: Should not pause.
     55
     56Adding saved console value 'true'...
     57Setting condition to saved console value...
    3858
    3959Triggering breakpoint...
     
    113133PASS: Should not pause.
    114134
     135-- Running test case: Debugger.setPauseOnMicrotasks.Options.Actions.Evaluate.ConsoleCommandLineAPI
     136Adding saved console value '1'...
     137
     138Adding evaluate action using saved console value...
     139
     140Triggering breakpoint...
     141PASS: Should execute breakpoint action.
     142PASS: Should pause.
     143
     144Adding saved console value '2'...
     145Editing evaluate action using saved console value...
     146
     147Triggering breakpoint...
     148PASS: Should execute breakpoint action.
     149PASS: Should pause.
     150
     151Adding saved console value '3'...
     152Editing evaluate action using saved console value...
     153Enabling auto-continue...
     154
     155Triggering breakpoint...
     156PASS: Should execute breakpoint action.
     157PASS: Should not pause.
     158
     159Adding saved console value '4'...
     160Editing evaluate action using saved console value...
     161
     162Triggering breakpoint...
     163PASS: Should execute breakpoint action.
     164PASS: Should not pause.
     165
  • trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style-expected.txt

    r266669 r269023  
    9191PASS: Should pause.
    9292
     93-- Running test case: DOMBreakpoint.AttributeModified.Style.Options.Condition.ConsoleCommandLineAPI
     94Adding saved console value 'false'...
     95Adding "attribute-modified:1,HTML,1,BODY,1,DIV" DOM Breakpoint...
     96
     97Setting condition to saved console value...
     98
     99Triggering breakpoint...
     100PASS: Should not pause.
     101
     102Triggering breakpoint...
     103PASS: Should not pause.
     104
     105Adding saved console value 'true'...
     106Setting condition to saved console value...
     107
     108Triggering breakpoint...
     109PASS: Should pause.
     110
     111Triggering breakpoint...
     112PASS: Should pause.
     113
    93114-- Running test case: DOMBreakpoint.AttributeModified.Style.Options.IgnoreCount
    94115Adding "attribute-modified:1,HTML,1,BODY,1,DIV" DOM Breakpoint...
     
    164185PASS: Should not pause.
    165186
     187-- Running test case: DOMBreakpoint.AttributeModified.Style.Options.Actions.Evaluate.ConsoleCommandLineAPI
     188Adding saved console value '1'...
     189Adding "attribute-modified:1,HTML,1,BODY,1,DIV" DOM Breakpoint...
     190
     191Adding evaluate action using saved console value...
     192
     193Triggering breakpoint...
     194PASS: Should execute breakpoint action.
     195PASS: Should pause.
     196
     197Adding saved console value '2'...
     198Editing evaluate action using saved console value...
     199
     200Triggering breakpoint...
     201PASS: Should execute breakpoint action.
     202PASS: Should pause.
     203
     204Adding saved console value '3'...
     205Editing evaluate action using saved console value...
     206Enabling auto-continue...
     207
     208Triggering breakpoint...
     209PASS: Should execute breakpoint action.
     210PASS: Should not pause.
     211
     212Adding saved console value '4'...
     213Editing evaluate action using saved console value...
     214
     215Triggering breakpoint...
     216PASS: Should execute breakpoint action.
     217PASS: Should not pause.
     218
  • trunk/LayoutTests/inspector/dom-debugger/dom-breakpoint-attribute-modified-expected.txt

    r266669 r269023  
    5252
    5353Setting condition to 'true'...
     54
     55Triggering breakpoint...
     56PASS: Should pause.
     57
     58Triggering breakpoint...
     59PASS: Should pause.
     60
     61-- Running test case: DOMBreakpoint.AttributeModified.Options.Condition.ConsoleCommandLineAPI
     62Adding saved console value 'false'...
     63Adding "attribute-modified:1,HTML,1,BODY,1,DIV,0,DIV" DOM Breakpoint...
     64
     65Setting condition to saved console value...
     66
     67Triggering breakpoint...
     68PASS: Should not pause.
     69
     70Triggering breakpoint...
     71PASS: Should not pause.
     72
     73Adding saved console value 'true'...
     74Setting condition to saved console value...
    5475
    5576Triggering breakpoint...
     
    132153PASS: Should not pause.
    133154
     155-- Running test case: DOMBreakpoint.AttributeModified.Options.Actions.Evaluate.ConsoleCommandLineAPI
     156Adding saved console value '1'...
     157Adding "attribute-modified:1,HTML,1,BODY,1,DIV,0,DIV" DOM Breakpoint...
     158
     159Adding evaluate action using saved console value...
     160
     161Triggering breakpoint...
     162PASS: Should execute breakpoint action.
     163PASS: Should pause.
     164
     165Adding saved console value '2'...
     166Editing evaluate action using saved console value...
     167
     168Triggering breakpoint...
     169PASS: Should execute breakpoint action.
     170PASS: Should pause.
     171
     172Adding saved console value '3'...
     173Editing evaluate action using saved console value...
     174Enabling auto-continue...
     175
     176Triggering breakpoint...
     177PASS: Should execute breakpoint action.
     178PASS: Should not pause.
     179
     180Adding saved console value '4'...
     181Editing evaluate action using saved console value...
     182
     183Triggering breakpoint...
     184PASS: Should execute breakpoint action.
     185PASS: Should not pause.
     186
  • trunk/LayoutTests/inspector/dom-debugger/dom-breakpoint-node-removed-ancestor-expected.txt

    r266669 r269023  
    5353
    5454Setting condition to 'true'...
     55
     56Triggering breakpoint...
     57PASS: Should pause.
     58
     59Triggering breakpoint...
     60PASS: Should pause.
     61
     62-- Running test case: DOMBreakpoint.NodeRemoved.Ancestor.Options.Condition.ConsoleCommandLineAPI
     63Adding saved console value 'false'...
     64Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
     65
     66Setting condition to saved console value...
     67
     68Triggering breakpoint...
     69PASS: Should not pause.
     70
     71Triggering breakpoint...
     72PASS: Should not pause.
     73
     74Adding saved console value 'true'...
     75Setting condition to saved console value...
    5576
    5677Triggering breakpoint...
     
    116137PASS: Should not pause.
    117138
     139-- Running test case: DOMBreakpoint.NodeRemoved.Ancestor.Options.Actions.Evaluate.ConsoleCommandLineAPI
     140Adding saved console value '1'...
     141Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
     142
     143Adding evaluate action using saved console value...
     144
     145Triggering breakpoint...
     146PASS: Should execute breakpoint action.
     147PASS: Should pause.
     148
     149Adding saved console value '2'...
     150Editing evaluate action using saved console value...
     151
     152Triggering breakpoint...
     153PASS: Should execute breakpoint action.
     154PASS: Should pause.
     155
     156Adding saved console value '3'...
     157Editing evaluate action using saved console value...
     158Enabling auto-continue...
     159
     160Triggering breakpoint...
     161PASS: Should execute breakpoint action.
     162PASS: Should not pause.
     163
     164Adding saved console value '4'...
     165Editing evaluate action using saved console value...
     166
     167Triggering breakpoint...
     168PASS: Should execute breakpoint action.
     169PASS: Should not pause.
     170
  • trunk/LayoutTests/inspector/dom-debugger/dom-breakpoint-node-removed-direct-expected.txt

    r266669 r269023  
    5252
    5353Setting condition to 'true'...
     54
     55Triggering breakpoint...
     56PASS: Should pause.
     57
     58Triggering breakpoint...
     59PASS: Should pause.
     60
     61-- Running test case: DOMBreakpoint.NodeRemoved.Direct.Options.Condition.ConsoleCommandLineAPI
     62Adding saved console value 'false'...
     63Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV" DOM Breakpoint...
     64
     65Setting condition to saved console value...
     66
     67Triggering breakpoint...
     68PASS: Should not pause.
     69
     70Triggering breakpoint...
     71PASS: Should not pause.
     72
     73Adding saved console value 'true'...
     74Setting condition to saved console value...
    5475
    5576Triggering breakpoint...
     
    115136PASS: Should not pause.
    116137
     138-- Running test case: DOMBreakpoint.NodeRemoved.Direct.Options.Actions.Evaluate.ConsoleCommandLineAPI
     139Adding saved console value '1'...
     140Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV" DOM Breakpoint...
     141
     142Adding evaluate action using saved console value...
     143
     144Triggering breakpoint...
     145PASS: Should execute breakpoint action.
     146PASS: Should pause.
     147
     148Adding saved console value '2'...
     149Editing evaluate action using saved console value...
     150
     151Triggering breakpoint...
     152PASS: Should execute breakpoint action.
     153PASS: Should pause.
     154
     155Adding saved console value '3'...
     156Editing evaluate action using saved console value...
     157Enabling auto-continue...
     158
     159Triggering breakpoint...
     160PASS: Should execute breakpoint action.
     161PASS: Should not pause.
     162
     163Adding saved console value '4'...
     164Editing evaluate action using saved console value...
     165
     166Triggering breakpoint...
     167PASS: Should execute breakpoint action.
     168PASS: Should not pause.
     169
  • trunk/LayoutTests/inspector/dom-debugger/dom-breakpoint-subtree-modified-add-expected.txt

    r266669 r269023  
    5353
    5454Setting condition to 'true'...
     55
     56Triggering breakpoint...
     57PASS: Should pause.
     58
     59Triggering breakpoint...
     60PASS: Should pause.
     61
     62-- Running test case: DOMBreakpoint.SubtreeModified.Add.Options.Condition.ConsoleCommandLineAPI
     63Adding saved console value 'false'...
     64Adding "subtree-modified:1,HTML,1,BODY,1,DIV,0,DIV" DOM Breakpoint...
     65
     66Setting condition to saved console value...
     67
     68Triggering breakpoint...
     69PASS: Should not pause.
     70
     71Triggering breakpoint...
     72PASS: Should not pause.
     73
     74Adding saved console value 'true'...
     75Setting condition to saved console value...
    5576
    5677Triggering breakpoint...
     
    133154PASS: Should not pause.
    134155
     156-- Running test case: DOMBreakpoint.SubtreeModified.Add.Options.Actions.Evaluate.ConsoleCommandLineAPI
     157Adding saved console value '1'...
     158Adding "subtree-modified:1,HTML,1,BODY,1,DIV,0,DIV" DOM Breakpoint...
     159
     160Adding evaluate action using saved console value...
     161
     162Triggering breakpoint...
     163PASS: Should execute breakpoint action.
     164PASS: Should pause.
     165
     166Adding saved console value '2'...
     167Editing evaluate action using saved console value...
     168
     169Triggering breakpoint...
     170PASS: Should execute breakpoint action.
     171PASS: Should pause.
     172
     173Adding saved console value '3'...
     174Editing evaluate action using saved console value...
     175Enabling auto-continue...
     176
     177Triggering breakpoint...
     178PASS: Should execute breakpoint action.
     179PASS: Should not pause.
     180
     181Adding saved console value '4'...
     182Editing evaluate action using saved console value...
     183
     184Triggering breakpoint...
     185PASS: Should execute breakpoint action.
     186PASS: Should not pause.
     187
  • trunk/LayoutTests/inspector/dom-debugger/dom-breakpoint-subtree-modified-remove-expected.txt

    r266669 r269023  
    5353
    5454Setting condition to 'true'...
     55
     56Triggering breakpoint...
     57PASS: Should pause.
     58
     59Triggering breakpoint...
     60PASS: Should pause.
     61
     62-- Running test case: DOMBreakpoint.SubtreeModified.Remove.Options.Condition.ConsoleCommandLineAPI
     63Adding saved console value 'false'...
     64Adding "subtree-modified:1,HTML,1,BODY,1,DIV,0,DIV" DOM Breakpoint...
     65
     66Setting condition to saved console value...
     67
     68Triggering breakpoint...
     69PASS: Should not pause.
     70
     71Triggering breakpoint...
     72PASS: Should not pause.
     73
     74Adding saved console value 'true'...
     75Setting condition to saved console value...
    5576
    5677Triggering breakpoint...
     
    133154PASS: Should not pause.
    134155
     156-- Running test case: DOMBreakpoint.SubtreeModified.Remove.Options.Actions.Evaluate.ConsoleCommandLineAPI
     157Adding saved console value '1'...
     158Adding "subtree-modified:1,HTML,1,BODY,1,DIV,0,DIV" DOM Breakpoint...
     159
     160Adding evaluate action using saved console value...
     161
     162Triggering breakpoint...
     163PASS: Should execute breakpoint action.
     164PASS: Should pause.
     165
     166Adding saved console value '2'...
     167Editing evaluate action using saved console value...
     168
     169Triggering breakpoint...
     170PASS: Should execute breakpoint action.
     171PASS: Should pause.
     172
     173Adding saved console value '3'...
     174Editing evaluate action using saved console value...
     175Enabling auto-continue...
     176
     177Triggering breakpoint...
     178PASS: Should execute breakpoint action.
     179PASS: Should not pause.
     180
     181Adding saved console value '4'...
     182Editing evaluate action using saved console value...
     183
     184Triggering breakpoint...
     185PASS: Should execute breakpoint action.
     186PASS: Should not pause.
     187
  • trunk/LayoutTests/inspector/dom-debugger/event-animation-frame-breakpoints-expected.txt

    r266538 r269023  
    5858
    5959Setting condition to 'true'...
     60
     61Triggering breakpoint...
     62PASS: Should pause.
     63
     64Triggering breakpoint...
     65PASS: Should pause.
     66
     67-- Running test case: DOMDebugger.Event.AnimationFrame.Options.Condition.ConsoleCommandLineAPI
     68Adding saved console value 'false'...
     69Creating "animation-frame" Event Breakpoint...
     70Adding "animation-frame" Event Breakpoint...
     71
     72Setting condition to saved console value...
     73
     74Triggering breakpoint...
     75PASS: Should not pause.
     76
     77Triggering breakpoint...
     78PASS: Should not pause.
     79
     80Adding saved console value 'true'...
     81Setting condition to saved console value...
    6082
    6183Triggering breakpoint...
     
    141163PASS: Should not pause.
    142164
     165-- Running test case: DOMDebugger.Event.AnimationFrame.Options.Actions.Evaluate.ConsoleCommandLineAPI
     166Adding saved console value '1'...
     167Creating "animation-frame" Event Breakpoint...
     168Adding "animation-frame" Event Breakpoint...
     169
     170Adding evaluate action using saved console value...
     171
     172Triggering breakpoint...
     173PASS: Should execute breakpoint action.
     174PASS: Should pause.
     175
     176Adding saved console value '2'...
     177Editing evaluate action using saved console value...
     178
     179Triggering breakpoint...
     180PASS: Should execute breakpoint action.
     181PASS: Should pause.
     182
     183Adding saved console value '3'...
     184Editing evaluate action using saved console value...
     185Enabling auto-continue...
     186
     187Triggering breakpoint...
     188PASS: Should execute breakpoint action.
     189PASS: Should not pause.
     190
     191Adding saved console value '4'...
     192Editing evaluate action using saved console value...
     193
     194Triggering breakpoint...
     195PASS: Should execute breakpoint action.
     196PASS: Should not pause.
     197
  • trunk/LayoutTests/inspector/dom-debugger/event-interval-breakpoints-expected.txt

    r266538 r269023  
    8585PASS: Should pause.
    8686
     87-- Running test case: DOMDebugger.Event.Interval.Options.Condition.ConsoleCommandLineAPI
     88Adding saved console value 'false'...
     89Creating "interval" Event Breakpoint...
     90Adding "interval" Event Breakpoint...
     91
     92Setting condition to saved console value...
     93
     94Triggering breakpoint...
     95PASS: Should not pause.
     96
     97Triggering breakpoint...
     98PASS: Should not pause.
     99
     100Adding saved console value 'true'...
     101Setting condition to saved console value...
     102
     103Triggering breakpoint...
     104PASS: Should pause.
     105
     106Triggering breakpoint...
     107PASS: Should pause.
     108
    87109-- Running test case: DOMDebugger.Event.Interval.Options.IgnoreCount
    88110Creating "interval" Event Breakpoint...
     
    161183PASS: Should not pause.
    162184
     185-- Running test case: DOMDebugger.Event.Interval.Options.Actions.Evaluate.ConsoleCommandLineAPI
     186Adding saved console value '1'...
     187Creating "interval" Event Breakpoint...
     188Adding "interval" Event Breakpoint...
     189
     190Adding evaluate action using saved console value...
     191
     192Triggering breakpoint...
     193PASS: Should execute breakpoint action.
     194PASS: Should pause.
     195
     196Adding saved console value '2'...
     197Editing evaluate action using saved console value...
     198
     199Triggering breakpoint...
     200PASS: Should execute breakpoint action.
     201PASS: Should pause.
     202
     203Adding saved console value '3'...
     204Editing evaluate action using saved console value...
     205Enabling auto-continue...
     206
     207Triggering breakpoint...
     208PASS: Should execute breakpoint action.
     209PASS: Should not pause.
     210
     211Adding saved console value '4'...
     212Editing evaluate action using saved console value...
     213
     214Triggering breakpoint...
     215PASS: Should execute breakpoint action.
     216PASS: Should not pause.
     217
  • trunk/LayoutTests/inspector/dom-debugger/event-listener-breakpoints-expected.txt

    r266538 r269023  
    147147PASS: Should pause.
    148148
     149-- Running test case: DOMDebugger.Event.Listener.Options.Condition.ConsoleCommandLineAPI
     150Adding saved console value 'false'...
     151Creating "click" Event Breakpoint...
     152Adding "listener:click" Event Breakpoint...
     153
     154Setting condition to saved console value...
     155
     156Triggering breakpoint...
     157PASS: Should not pause.
     158
     159Triggering breakpoint...
     160PASS: Should not pause.
     161
     162Adding saved console value 'true'...
     163Setting condition to saved console value...
     164
     165Triggering breakpoint...
     166PASS: Should pause.
     167
     168Triggering breakpoint...
     169PASS: Should pause.
     170
    149171-- Running test case: DOMDebugger.Event.Listener.Options.IgnoreCount
    150172Creating "click" Event Breakpoint...
     
    223245PASS: Should not pause.
    224246
     247-- Running test case: DOMDebugger.Event.Listener.Options.Actions.Evaluate.ConsoleCommandLineAPI
     248Adding saved console value '1'...
     249Creating "click" Event Breakpoint...
     250Adding "listener:click" Event Breakpoint...
     251
     252Adding evaluate action using saved console value...
     253
     254Triggering breakpoint...
     255PASS: Should execute breakpoint action.
     256PASS: Should pause.
     257
     258Adding saved console value '2'...
     259Editing evaluate action using saved console value...
     260
     261Triggering breakpoint...
     262PASS: Should execute breakpoint action.
     263PASS: Should pause.
     264
     265Adding saved console value '3'...
     266Editing evaluate action using saved console value...
     267Enabling auto-continue...
     268
     269Triggering breakpoint...
     270PASS: Should execute breakpoint action.
     271PASS: Should not pause.
     272
     273Adding saved console value '4'...
     274Editing evaluate action using saved console value...
     275
     276Triggering breakpoint...
     277PASS: Should execute breakpoint action.
     278PASS: Should not pause.
     279
  • trunk/LayoutTests/inspector/dom-debugger/event-timeout-breakpoints-expected.txt

    r266538 r269023  
    5858
    5959Setting condition to 'true'...
     60
     61Triggering breakpoint...
     62PASS: Should pause.
     63
     64Triggering breakpoint...
     65PASS: Should pause.
     66
     67-- Running test case: DOMDebugger.Event.Timer.Options.Condition.ConsoleCommandLineAPI
     68Adding saved console value 'false'...
     69Creating "timeout" Event Breakpoint...
     70Adding "timeout" Event Breakpoint...
     71
     72Setting condition to saved console value...
     73
     74Triggering breakpoint...
     75PASS: Should not pause.
     76
     77Triggering breakpoint...
     78PASS: Should not pause.
     79
     80Adding saved console value 'true'...
     81Setting condition to saved console value...
    6082
    6183Triggering breakpoint...
     
    141163PASS: Should not pause.
    142164
     165-- Running test case: DOMDebugger.Event.Timer.Options.Actions.Evaluate.ConsoleCommandLineAPI
     166Adding saved console value '1'...
     167Creating "timeout" Event Breakpoint...
     168Adding "timeout" Event Breakpoint...
     169
     170Adding evaluate action using saved console value...
     171
     172Triggering breakpoint...
     173PASS: Should execute breakpoint action.
     174PASS: Should pause.
     175
     176Adding saved console value '2'...
     177Editing evaluate action using saved console value...
     178
     179Triggering breakpoint...
     180PASS: Should execute breakpoint action.
     181PASS: Should pause.
     182
     183Adding saved console value '3'...
     184Editing evaluate action using saved console value...
     185Enabling auto-continue...
     186
     187Triggering breakpoint...
     188PASS: Should execute breakpoint action.
     189PASS: Should not pause.
     190
     191Adding saved console value '4'...
     192Editing evaluate action using saved console value...
     193
     194Triggering breakpoint...
     195PASS: Should execute breakpoint action.
     196PASS: Should not pause.
     197
  • trunk/LayoutTests/inspector/dom-debugger/url-breakpoints-all-requests-expected.txt

    r266538 r269023  
    4545PASS: Should pause.
    4646
     47-- Running test case: URLBreakpoint.BreakOnAll.Fetch.Options.Condition.ConsoleCommandLineAPI
     48Adding saved console value 'false'...
     49Adding All Requests URL Breakpoint...
     50
     51Setting condition to saved console value...
     52
     53Triggering breakpoint...
     54Request Fetch "resources/dataFetch.json"...
     55PASS: Should not pause.
     56
     57Triggering breakpoint...
     58Request Fetch "resources/dataFetch.json"...
     59PASS: Should not pause.
     60
     61Adding saved console value 'true'...
     62Setting condition to saved console value...
     63
     64Triggering breakpoint...
     65Request Fetch "resources/dataFetch.json"...
     66PASS: Should pause.
     67
     68Triggering breakpoint...
     69Request Fetch "resources/dataFetch.json"...
     70PASS: Should pause.
     71
    4772-- Running test case: URLBreakpoint.BreakOnAll.Fetch.Options.IgnoreCount
    4873Adding All Requests URL Breakpoint...
     
    124149
    125150Editing evaluate action...
     151
     152Triggering breakpoint...
     153Request Fetch "resources/dataFetch.json"...
     154PASS: Should execute breakpoint action.
     155PASS: Should not pause.
     156
     157-- Running test case: URLBreakpoint.BreakOnAll.Fetch.Options.Actions.Evaluate.ConsoleCommandLineAPI
     158Adding saved console value '1'...
     159Adding All Requests URL Breakpoint...
     160
     161Adding evaluate action using saved console value...
     162
     163Triggering breakpoint...
     164Request Fetch "resources/dataFetch.json"...
     165PASS: Should execute breakpoint action.
     166PASS: Should pause.
     167
     168Adding saved console value '2'...
     169Editing evaluate action using saved console value...
     170
     171Triggering breakpoint...
     172Request Fetch "resources/dataFetch.json"...
     173PASS: Should execute breakpoint action.
     174PASS: Should pause.
     175
     176Adding saved console value '3'...
     177Editing evaluate action using saved console value...
     178Enabling auto-continue...
     179
     180Triggering breakpoint...
     181Request Fetch "resources/dataFetch.json"...
     182PASS: Should execute breakpoint action.
     183PASS: Should not pause.
     184
     185Adding saved console value '4'...
     186Editing evaluate action using saved console value...
    126187
    127188Triggering breakpoint...
     
    164225PASS: Should pause.
    165226
     227-- Running test case: URLBreakpoint.BreakOnAll.XHR.Options.Condition.ConsoleCommandLineAPI
     228Adding saved console value 'false'...
     229Adding All Requests URL Breakpoint...
     230
     231Setting condition to saved console value...
     232
     233Triggering breakpoint...
     234Request XHR "resources/dataXHR.json"...
     235PASS: Should not pause.
     236
     237Triggering breakpoint...
     238Request XHR "resources/dataXHR.json"...
     239PASS: Should not pause.
     240
     241Adding saved console value 'true'...
     242Setting condition to saved console value...
     243
     244Triggering breakpoint...
     245Request XHR "resources/dataXHR.json"...
     246PASS: Should pause.
     247
     248Triggering breakpoint...
     249Request XHR "resources/dataXHR.json"...
     250PASS: Should pause.
     251
    166252-- Running test case: URLBreakpoint.BreakOnAll.XHR.Options.IgnoreCount
    167253Adding All Requests URL Breakpoint...
     
    249335PASS: Should not pause.
    250336
     337-- Running test case: URLBreakpoint.BreakOnAll.XHR.Options.Actions.Evaluate.ConsoleCommandLineAPI
     338Adding saved console value '1'...
     339Adding All Requests URL Breakpoint...
     340
     341Adding evaluate action using saved console value...
     342
     343Triggering breakpoint...
     344Request XHR "resources/dataXHR.json"...
     345PASS: Should execute breakpoint action.
     346PASS: Should pause.
     347
     348Adding saved console value '2'...
     349Editing evaluate action using saved console value...
     350
     351Triggering breakpoint...
     352Request XHR "resources/dataXHR.json"...
     353PASS: Should execute breakpoint action.
     354PASS: Should pause.
     355
     356Adding saved console value '3'...
     357Editing evaluate action using saved console value...
     358Enabling auto-continue...
     359
     360Triggering breakpoint...
     361Request XHR "resources/dataXHR.json"...
     362PASS: Should execute breakpoint action.
     363PASS: Should not pause.
     364
     365Adding saved console value '4'...
     366Editing evaluate action using saved console value...
     367
     368Triggering breakpoint...
     369Request XHR "resources/dataXHR.json"...
     370PASS: Should execute breakpoint action.
     371PASS: Should not pause.
     372
  • trunk/LayoutTests/inspector/dom-debugger/url-breakpoints-containing-expected.txt

    r266538 r269023  
    4545PASS: Should pause.
    4646
     47-- Running test case: URLBreakpoint.BreakOnContainingText.Fetch.Options.Condition.ConsoleCommandLineAPI
     48Adding saved console value 'false'...
     49Adding "text:data" URL Breakpoint...
     50
     51Setting condition to saved console value...
     52
     53Triggering breakpoint...
     54Request Fetch "resources/dataFetch.json"...
     55PASS: Should not pause.
     56
     57Triggering breakpoint...
     58Request Fetch "resources/dataFetch.json"...
     59PASS: Should not pause.
     60
     61Adding saved console value 'true'...
     62Setting condition to saved console value...
     63
     64Triggering breakpoint...
     65Request Fetch "resources/dataFetch.json"...
     66PASS: Should pause.
     67
     68Triggering breakpoint...
     69Request Fetch "resources/dataFetch.json"...
     70PASS: Should pause.
     71
    4772-- Running test case: URLBreakpoint.BreakOnContainingText.Fetch.Options.IgnoreCount
    4873Adding "text:data" URL Breakpoint...
     
    124149
    125150Editing evaluate action...
     151
     152Triggering breakpoint...
     153Request Fetch "resources/dataFetch.json"...
     154PASS: Should execute breakpoint action.
     155PASS: Should not pause.
     156
     157-- Running test case: URLBreakpoint.BreakOnContainingText.Fetch.Options.Actions.Evaluate.ConsoleCommandLineAPI
     158Adding saved console value '1'...
     159Adding "text:data" URL Breakpoint...
     160
     161Adding evaluate action using saved console value...
     162
     163Triggering breakpoint...
     164Request Fetch "resources/dataFetch.json"...
     165PASS: Should execute breakpoint action.
     166PASS: Should pause.
     167
     168Adding saved console value '2'...
     169Editing evaluate action using saved console value...
     170
     171Triggering breakpoint...
     172Request Fetch "resources/dataFetch.json"...
     173PASS: Should execute breakpoint action.
     174PASS: Should pause.
     175
     176Adding saved console value '3'...
     177Editing evaluate action using saved console value...
     178Enabling auto-continue...
     179
     180Triggering breakpoint...
     181Request Fetch "resources/dataFetch.json"...
     182PASS: Should execute breakpoint action.
     183PASS: Should not pause.
     184
     185Adding saved console value '4'...
     186Editing evaluate action using saved console value...
    126187
    127188Triggering breakpoint...
     
    164225PASS: Should pause.
    165226
     227-- Running test case: URLBreakpoint.BreakOnContainingText.XHR.Options.Condition.ConsoleCommandLineAPI
     228Adding saved console value 'false'...
     229Adding "text:data" URL Breakpoint...
     230
     231Setting condition to saved console value...
     232
     233Triggering breakpoint...
     234Request XHR "resources/dataXHR.json"...
     235PASS: Should not pause.
     236
     237Triggering breakpoint...
     238Request XHR "resources/dataXHR.json"...
     239PASS: Should not pause.
     240
     241Adding saved console value 'true'...
     242Setting condition to saved console value...
     243
     244Triggering breakpoint...
     245Request XHR "resources/dataXHR.json"...
     246PASS: Should pause.
     247
     248Triggering breakpoint...
     249Request XHR "resources/dataXHR.json"...
     250PASS: Should pause.
     251
    166252-- Running test case: URLBreakpoint.BreakOnContainingText.XHR.Options.IgnoreCount
    167253Adding "text:data" URL Breakpoint...
     
    249335PASS: Should not pause.
    250336
     337-- Running test case: URLBreakpoint.BreakOnContainingText.XHR.Options.Actions.Evaluate.ConsoleCommandLineAPI
     338Adding saved console value '1'...
     339Adding "text:data" URL Breakpoint...
     340
     341Adding evaluate action using saved console value...
     342
     343Triggering breakpoint...
     344Request XHR "resources/dataXHR.json"...
     345PASS: Should execute breakpoint action.
     346PASS: Should pause.
     347
     348Adding saved console value '2'...
     349Editing evaluate action using saved console value...
     350
     351Triggering breakpoint...
     352Request XHR "resources/dataXHR.json"...
     353PASS: Should execute breakpoint action.
     354PASS: Should pause.
     355
     356Adding saved console value '3'...
     357Editing evaluate action using saved console value...
     358Enabling auto-continue...
     359
     360Triggering breakpoint...
     361Request XHR "resources/dataXHR.json"...
     362PASS: Should execute breakpoint action.
     363PASS: Should not pause.
     364
     365Adding saved console value '4'...
     366Editing evaluate action using saved console value...
     367
     368Triggering breakpoint...
     369Request XHR "resources/dataXHR.json"...
     370PASS: Should execute breakpoint action.
     371PASS: Should not pause.
     372
  • trunk/LayoutTests/inspector/dom-debugger/url-breakpoints-matching-expected.txt

    r266538 r269023  
    4545PASS: Should pause.
    4646
     47-- Running test case: URLBreakpoint.BreakOnMatchingRegularExpression.Fetch.Options.Condition.ConsoleCommandLineAPI
     48Adding saved console value 'false'...
     49Adding "regex:data[A-Z]*.(json|txt|png)" URL Breakpoint...
     50
     51Setting condition to saved console value...
     52
     53Triggering breakpoint...
     54Request Fetch "resources/dataFetch.json"...
     55PASS: Should not pause.
     56
     57Triggering breakpoint...
     58Request Fetch "resources/dataFetch.json"...
     59PASS: Should not pause.
     60
     61Adding saved console value 'true'...
     62Setting condition to saved console value...
     63
     64Triggering breakpoint...
     65Request Fetch "resources/dataFetch.json"...
     66PASS: Should pause.
     67
     68Triggering breakpoint...
     69Request Fetch "resources/dataFetch.json"...
     70PASS: Should pause.
     71
    4772-- Running test case: URLBreakpoint.BreakOnMatchingRegularExpression.Fetch.Options.IgnoreCount
    4873Adding "regex:data[A-Z]*.(json|txt|png)" URL Breakpoint...
     
    124149
    125150Editing evaluate action...
     151
     152Triggering breakpoint...
     153Request Fetch "resources/dataFetch.json"...
     154PASS: Should execute breakpoint action.
     155PASS: Should not pause.
     156
     157-- Running test case: URLBreakpoint.BreakOnMatchingRegularExpression.Fetch.Options.Actions.Evaluate.ConsoleCommandLineAPI
     158Adding saved console value '1'...
     159Adding "regex:data[A-Z]*.(json|txt|png)" URL Breakpoint...
     160
     161Adding evaluate action using saved console value...
     162
     163Triggering breakpoint...
     164Request Fetch "resources/dataFetch.json"...
     165PASS: Should execute breakpoint action.
     166PASS: Should pause.
     167
     168Adding saved console value '2'...
     169Editing evaluate action using saved console value...
     170
     171Triggering breakpoint...
     172Request Fetch "resources/dataFetch.json"...
     173PASS: Should execute breakpoint action.
     174PASS: Should pause.
     175
     176Adding saved console value '3'...
     177Editing evaluate action using saved console value...
     178Enabling auto-continue...
     179
     180Triggering breakpoint...
     181Request Fetch "resources/dataFetch.json"...
     182PASS: Should execute breakpoint action.
     183PASS: Should not pause.
     184
     185Adding saved console value '4'...
     186Editing evaluate action using saved console value...
    126187
    127188Triggering breakpoint...
     
    164225PASS: Should pause.
    165226
     227-- Running test case: URLBreakpoint.BreakOnMatchingRegularExpression.XHR.Options.Condition.ConsoleCommandLineAPI
     228Adding saved console value 'false'...
     229Adding "regex:data[A-Z]*.(json|txt|png)" URL Breakpoint...
     230
     231Setting condition to saved console value...
     232
     233Triggering breakpoint...
     234Request XHR "resources/dataXHR.json"...
     235PASS: Should not pause.
     236
     237Triggering breakpoint...
     238Request XHR "resources/dataXHR.json"...
     239PASS: Should not pause.
     240
     241Adding saved console value 'true'...
     242Setting condition to saved console value...
     243
     244Triggering breakpoint...
     245Request XHR "resources/dataXHR.json"...
     246PASS: Should pause.
     247
     248Triggering breakpoint...
     249Request XHR "resources/dataXHR.json"...
     250PASS: Should pause.
     251
    166252-- Running test case: URLBreakpoint.BreakOnMatchingRegularExpression.XHR.Options.IgnoreCount
    167253Adding "regex:data[A-Z]*.(json|txt|png)" URL Breakpoint...
     
    249335PASS: Should not pause.
    250336
     337-- Running test case: URLBreakpoint.BreakOnMatchingRegularExpression.XHR.Options.Actions.Evaluate.ConsoleCommandLineAPI
     338Adding saved console value '1'...
     339Adding "regex:data[A-Z]*.(json|txt|png)" URL Breakpoint...
     340
     341Adding evaluate action using saved console value...
     342
     343Triggering breakpoint...
     344Request XHR "resources/dataXHR.json"...
     345PASS: Should execute breakpoint action.
     346PASS: Should pause.
     347
     348Adding saved console value '2'...
     349Editing evaluate action using saved console value...
     350
     351Triggering breakpoint...
     352Request XHR "resources/dataXHR.json"...
     353PASS: Should execute breakpoint action.
     354PASS: Should pause.
     355
     356Adding saved console value '3'...
     357Editing evaluate action using saved console value...
     358Enabling auto-continue...
     359
     360Triggering breakpoint...
     361Request XHR "resources/dataXHR.json"...
     362PASS: Should execute breakpoint action.
     363PASS: Should not pause.
     364
     365Adding saved console value '4'...
     366Editing evaluate action using saved console value...
     367
     368Triggering breakpoint...
     369Request XHR "resources/dataXHR.json"...
     370PASS: Should execute breakpoint action.
     371PASS: Should not pause.
     372
  • trunk/Source/JavaScriptCore/ChangeLog

    r269020 r269023  
     12020-10-26  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: console command line API should be exposed to breakpoint conditions/actions
     4        https://bugs.webkit.org/show_bug.cgi?id=218141
     5        <rdar://problem/70636727>
     6
     7        Reviewed by Brian Burg.
     8
     9        * debugger/Debugger.h:
     10        (JSC::Debugger::Client::scopeExtensionObject): Added.
     11        * debugger/Debugger.cpp:
     12        (JSC::Debugger::setClient): Added.
     13        (JSC::Debugger::evaluateBreakpointCondition):
     14        (JSC::Debugger::evaluateBreakpointActions):
     15        Introduce an optional `Debugger::Client` virtual class that can be used to adjust behavior
     16        in various situations. Right now it is used when evaluating breakpoint conditions/actions
     17        to get a scope extension object.
     18
     19        * inspector/agents/InspectorDebuggerAgent.h:
     20        * inspector/agents/InspectorDebuggerAgent.cpp:
     21        (Inspector::InspectorDebuggerAgent::internalEnable):
     22        (Inspector::InspectorDebuggerAgent::internalDisable):
     23        (Inspector::InspectorDebuggerAgent::scopeExtensionObject): Added.
     24        Implement `Debugger::Client` and provide a newly created `CommandLineAPI` instance.
     25
     26        * inspector/InjectedScript.h:
     27        * inspector/InjectedScript.cpp:
     28        (Inspector::InjectedScript::createCommandLineAPIObject const): Added.
     29        * inspector/InjectedScriptSource.js:
     30        (let.InjectedScript.prototype.createCommandLineAPIObject): Added.
     31        (let.InjectedScript.prototype._evaluateOn):
     32        Expose a way for the C++ to create `CommandLineAPI` instances.
     33
    1342020-10-15  Tadeu Zagallo  <tzagallo@apple.com>
    235
  • trunk/Source/JavaScriptCore/debugger/Debugger.cpp

    r266534 r269023  
    238238}
    239239
     240void Debugger::setClient(Client* client)
     241{
     242    ASSERT(!!m_client != !!client);
     243    m_client = client;
     244}
     245
    240246void Debugger::addObserver(Observer& observer)
    241247{
     
    610616    NakedPtr<Exception> exception;
    611617    DebuggerCallFrame& debuggerCallFrame = currentDebuggerCallFrame();
    612     JSObject* scopeExtensionObject = nullptr;
     618    JSObject* scopeExtensionObject = m_client ? m_client->scopeExtensionObject(*this, globalObject, debuggerCallFrame) : nullptr;
    613619    JSValue result = debuggerCallFrame.evaluateWithScopeExtension(condition, scopeExtensionObject, exception);
    614620
     
    644650        case Breakpoint::Action::Type::Evaluate: {
    645651            NakedPtr<Exception> exception;
    646             JSObject* scopeExtensionObject = nullptr;
     652            JSObject* scopeExtensionObject = m_client ? m_client->scopeExtensionObject(*this, globalObject, debuggerCallFrame) : nullptr;
    647653            debuggerCallFrame.evaluateWithScopeExtension(action.data, scopeExtensionObject, exception);
    648654            if (exception)
     
    659665        case Breakpoint::Action::Type::Probe: {
    660666            NakedPtr<Exception> exception;
    661             JSObject* scopeExtensionObject = nullptr;
     667            JSObject* scopeExtensionObject = m_client ? m_client->scopeExtensionObject(*this, globalObject, debuggerCallFrame) : nullptr;
    662668            JSValue result = debuggerCallFrame.evaluateWithScopeExtension(action.data, scopeExtensionObject, exception);
    663669            JSC::JSGlobalObject* debuggerGlobalObject = debuggerCallFrame.globalObject();
  • trunk/Source/JavaScriptCore/debugger/Debugger.h

    r266534 r269023  
    141141    void registerCodeBlock(CodeBlock*);
    142142
     143    class Client {
     144    public:
     145        virtual ~Client() = default;
     146
     147        virtual JSObject* scopeExtensionObject(Debugger&, JSGlobalObject*, DebuggerCallFrame&) { return nullptr; }
     148    };
     149
     150    void setClient(Client*);
     151
    143152    // FIXME: <https://webkit.org/b/162773> Web Inspector: Simplify Debugger::Script to use SourceProvider
    144153    struct Script {
     
    326335    bool m_dispatchingFunctionToObservers { false };
    327336
     337    Client* m_client { nullptr };
    328338    ProfilingClient* m_profilingClient { nullptr };
    329339
  • trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp

    r266885 r269023  
    443443}
    444444
     445JSC::JSObject* InjectedScript::createCommandLineAPIObject(JSC::JSValue callFrame) const
     446{
     447    ASSERT(!hasNoValue());
     448    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "createCommandLineAPIObject"_s, inspectorEnvironment()->functionCallHandler());
     449    function.appendArgument(callFrame);
     450
     451    auto callResult = callFunctionWithEvalEnabled(function);
     452    ASSERT(callResult);
     453    return callResult ? asObject(callResult.value()) : nullptr;
     454}
     455
    445456JSC::JSValue InjectedScript::arrayFromVector(Vector<JSC::JSValue>&& vector)
    446457{
  • trunk/Source/JavaScriptCore/inspector/InjectedScript.h

    r266885 r269023  
    9292    void releaseObjectGroup(const String& objectGroup);
    9393
     94    JSC::JSObject* createCommandLineAPIObject(JSC::JSValue callFrame = { }) const;
     95
    9496private:
    9597    JSC::JSValue arrayFromVector(Vector<JSC::JSValue>&&);
  • trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js

    r255675 r269023  
    410410    }
    411411
     412    createCommandLineAPIObject(callFrame)
     413    {
     414        return new CommandLineAPI(callFrame || null);
     415    }
     416
    412417    // CommandLineAPI
    413418
     
    566571        let commandLineAPI = null;
    567572        if (includeCommandLineAPI)
    568             commandLineAPI = new CommandLineAPI(isEvalOnCallFrame ? object : null);
     573            commandLineAPI = this.createCommandLineAPIObject(isEvalOnCallFrame ? object : null);
    569574        return evalFunction.call(object, expression, commandLineAPI);
    570575    }
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp

    r268629 r269023  
    241241    m_enabled = true;
    242242
     243    m_debugger.setClient(this);
    243244    m_debugger.addObserver(*this);
    244245
     
    262263        listener->debuggerWasDisabled();
    263264
     265    m_debugger.setClient(nullptr);
    264266    m_debugger.removeObserver(*this, isBeingDestroyed);
    265267
     
    11001102
    11011103    return { };
     1104}
     1105
     1106JSC::JSObject* InspectorDebuggerAgent::scopeExtensionObject(JSC::Debugger& debugger, JSC::JSGlobalObject* globalObject, JSC::DebuggerCallFrame& debuggerCallFrame)
     1107{
     1108    auto injectedScript = m_injectedScriptManager.injectedScriptFor(globalObject);
     1109    ASSERT(!injectedScript.hasNoValue());
     1110    if (injectedScript.hasNoValue())
     1111        return JSC::Debugger::Client::scopeExtensionObject(debugger, globalObject, debuggerCallFrame);
     1112
     1113    auto* debuggerGlobalObject = debuggerCallFrame.scope()->globalObject();
     1114    auto callFrame = toJS(debuggerGlobalObject, debuggerGlobalObject, JavaScriptCallFrame::create(debuggerCallFrame).ptr());
     1115    return injectedScript.createCommandLineAPIObject(callFrame);
    11021116}
    11031117
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h

    r266885 r269023  
    5050class InjectedScriptManager;
    5151
    52 class JS_EXPORT_PRIVATE InspectorDebuggerAgent : public InspectorAgentBase, public DebuggerBackendDispatcherHandler, public JSC::Debugger::Observer {
     52class JS_EXPORT_PRIVATE InspectorDebuggerAgent
     53    : public InspectorAgentBase
     54    , public DebuggerBackendDispatcherHandler
     55    , public JSC::Debugger::Client
     56    , public JSC::Debugger::Observer {
    5357    WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent);
    5458    WTF_MAKE_FAST_ALLOCATED;
     
    9296    Protocol::ErrorStringOr<void> setShouldBlackboxURL(const String& url, bool shouldBlackbox, Optional<bool>&& caseSensitive, Optional<bool>&& isRegex) final;
    9397
     98    // JSC::Debugger::Client
     99    JSC::JSObject* scopeExtensionObject(JSC::Debugger&, JSC::JSGlobalObject*, JSC::DebuggerCallFrame&) final;
     100
    94101    // JSC::Debugger::Observer
    95102    void didParseSource(JSC::SourceID, const JSC::Debugger::Script&) final;
  • trunk/Source/WebInspectorUI/ChangeLog

    r268982 r269023  
     12020-10-26  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: console command line API should be exposed to breakpoint conditions/actions
     4        https://bugs.webkit.org/show_bug.cgi?id=218141
     5        <rdar://problem/70636727>
     6
     7        Reviewed by Brian Burg.
     8
     9        * UserInterface/Controllers/CodeMirrorCompletionController.js:
     10        (WI.CodeMirrorCompletionController):
     11        (WI.CodeMirrorCompletionController.prototype.get mode): Added.
     12        (WI.CodeMirrorCompletionController.prototype.get delegate): Deleted.
     13        * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
     14        (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
     15        (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.shouldExposeEvent): Added.
     16        (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.shouldExposeException): Added.
     17        (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
     18        Introduce a `Mode` enum that can be fetched by completion providers to adjust functionality.
     19
     20        * UserInterface/Views/BreakpointPopover.js:
     21        (WI.BreakpointPopover.appendContextMenuItems):
     22        (WI.BreakpointPopover.prototype.show):
     23        (WI.BreakpointPopover.prototype.breakpointActionViewCodeMirrorCompletionControllerMode): Added.
     24        (WI.BreakpointPopover.prototype.get codeMirrorCompletionControllerMode): Added.
     25        * UserInterface/Views/EventBreakpointPopover.js:
     26        (WI.EventBreakpointPopover.prototype.get codeMirrorCompletionControllerMode): Added.
     27        * UserInterface/Views/BreakpointActionView.js:
     28        (WI.BreakpointActionView.prototype._updateBody):
     29        Use a `Mode` that always exposes `$event`/`$exception` depending on the breakpoint type.
     30
     31        * UserInterface/Views/ConsolePrompt.js:
     32        (WI.ConsolePrompt):
     33        Use a `Mode` that only exposes `$event`/`$exception` when paused for an event/exeption.
     34
     35        * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
     36        (WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
     37        Use a `Mode` that always exposes `$event`/`$exception` since watch expressions track values
     38        over time, and may therefore not always have an `$event`/`$exception` set.
     39
     40        * UserInterface/Views/TextEditor.js:
     41        (WI.TextEditor):
     42        Use the default `Mode` that never exposes `$event`/`$exception`.
     43
    1442020-10-26  Patrick Angle  <pangle@apple.com>
    245
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js

    r249185 r269023  
    2626WI.CodeMirrorCompletionController = class CodeMirrorCompletionController extends WI.Object
    2727{
    28     constructor(codeMirror, delegate, stopCharactersRegex)
    29     {
     28    constructor(mode, codeMirror, delegate, stopCharactersRegex)
     29    {
     30        console.assert(Object.values(WI.CodeMirrorCompletionController.Mode).includes(mode), mode);
     31        console.assert(codeMirror instanceof CodeMirror, codeMirror);
     32
    3033        super();
    3134
    32         console.assert(codeMirror);
    33 
     35        this._mode = mode;
    3436        this._codeMirror = codeMirror;
    3537        this._stopCharactersRegex = stopCharactersRegex || null;
     
    7577    // Public
    7678
    77     get delegate()
    78     {
    79         return this._delegate;
    80     }
     79    get mode() { return this._mode; }
    8180
    8281    addExtendedCompletionProvider(modeName, provider)
     
    899898};
    900899
     900WI.CodeMirrorCompletionController.Mode = {
     901    Basic: "basic",
     902    EventBreakpoint: "event-breakpoint",
     903    ExceptionBreakpoint: "exception-breakpoint",
     904    FullConsoleCommandLineAPI: "full-console-command-line-api",
     905    PausedConsoleCommandLineAPI: "paused-console-command-line-api",
     906};
     907
    901908WI.CodeMirrorCompletionController.UpdatePromise = {
    902909    Canceled: "code-mirror-completion-controller-canceled",
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js

    r251227 r269023  
    141141        // but this optimization gives us more of a win. We clear the cache after 30 seconds or when stepping in the
    142142        // debugger to make sure we don't use stale properties in most cases.
    143         if (this._lastBase === base && this._lastPropertyNames) {
     143        if (this._lastMode === completionController.mode && this._lastBase === base && this._lastPropertyNames) {
    144144            receivedPropertyNames.call(this, this._lastPropertyNames);
    145145            return;
    146146        }
    147147
     148        this._lastMode = completionController.mode;
    148149        this._lastBase = base;
    149150        this._lastPropertyNames = null;
     
    279280
    280281                let target = WI.runtimeManager.activeExecutionContext.target;
    281 
    282                 if (WI.debuggerManager.paused) {
    283                     let targetData = WI.debuggerManager.dataForTarget(target);
    284                     if (targetData.pauseReason === WI.DebuggerManager.PauseReason.Listener || targetData.pauseReason === WI.DebuggerManager.PauseReason.EventListener) {
    285                         propertyNames.push("$event");
    286                         if (savedResultAlias)
    287                             propertyNames.push(savedResultAlias + "event");
    288                     } else if (targetData.pauseReason === WI.DebuggerManager.PauseReason.Exception) {
    289                         propertyNames.push("$exception");
    290                         if (savedResultAlias)
    291                             propertyNames.push(savedResultAlias + "exception");
     282                let targetData = WI.debuggerManager.paused ? WI.debuggerManager.dataForTarget(target) : {};
     283
     284                function shouldExposeEvent() {
     285                    switch (completionController.mode) {
     286                    case WI.CodeMirrorCompletionController.Mode.FullConsoleCommandLineAPI:
     287                    case WI.CodeMirrorCompletionController.Mode.EventBreakpoint:
     288                        return true;
     289                    case WI.CodeMirrorCompletionController.Mode.PausedConsoleCommandLineAPI:
     290                        return targetData.pauseReason === WI.DebuggerManager.PauseReason.Listener || targetData.pauseReason === WI.DebuggerManager.PauseReason.EventListener;
    292291                    }
     292                    return false;
     293                }
     294                if (shouldExposeEvent()) {
     295                    propertyNames.push("$event");
     296                    if (savedResultAlias)
     297                        propertyNames.push(savedResultAlias + "event");
     298                }
     299
     300                function shouldExposeException() {
     301                    switch (completionController.mode) {
     302                    case WI.CodeMirrorCompletionController.Mode.FullConsoleCommandLineAPI:
     303                    case WI.CodeMirrorCompletionController.Mode.ExceptionBreakpoint:
     304                        return true;
     305                    case WI.CodeMirrorCompletionController.Mode.PausedConsoleCommandLineAPI:
     306                        return targetData.pauseReason === WI.DebuggerManager.PauseReason.Exception;
     307                    }
     308                    return false;
     309                }
     310                if (shouldExposeException()) {
     311                    propertyNames.push("$exception");
     312                    if (savedResultAlias)
     313                        propertyNames.push(savedResultAlias + "exception");
    293314                }
    294315
  • trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js

    r266480 r269023  
    165165            this._codeMirrorViewport = {from: null, to: null};
    166166
    167             var completionController = new WI.CodeMirrorCompletionController(this._codeMirror);
     167            var completionController = new WI.CodeMirrorCompletionController(this._delegate.breakpointActionViewCodeMirrorCompletionControllerMode(this, this._codeMirror), this._codeMirror);
    168168            completionController.addExtendedCompletionProvider("javascript", WI.javaScriptRuntimeCompletionProvider);
    169169
  • trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.js

    r266534 r269023  
    5656            contextMenu.appendItem(WI.UIString("Edit Breakpoint\u2026"), () => {
    5757                const delegate = null;
    58                 let popover = new WI.BreakpointPopover(delegate, breakpoint);
     58                let popover;
     59                if (breakpoint instanceof WI.EventBreakpoint)
     60                    popover = new WI.EventBreakpointPopover(delegate, breakpoint);
     61                else if (breakpoint instanceof WI.URLBreakpoint)
     62                    popover = new WI.URLBreakpointPopover(delegate, breakpoint);
     63                else
     64                    popover = new WI.BreakpointPopover(delegate, breakpoint);
    5965                popover.show(targetElement);
    6066            });
     
    165171                this._conditionCodeMirror.on("change", this._handleConditionCodeMirrorChange.bind(this));
    166172
    167             let completionController = new WI.CodeMirrorCompletionController(this._conditionCodeMirror, this);
     173            let completionController = new WI.CodeMirrorCompletionController(this.codeMirrorCompletionControllerMode, this._conditionCodeMirror, this);
    168174            completionController.addExtendedCompletionProvider("javascript", WI.javaScriptRuntimeCompletionProvider);
    169175
     
    274280    // BreakpointActionView delegate
    275281
     282    breakpointActionViewCodeMirrorCompletionControllerMode(breakpointActionView, codeMirror)
     283    {
     284        return this.codeMirrorCompletionControllerMode;
     285    }
     286
    276287    breakpointActionViewAppendActionView(breakpointActionView, newBreakpointAction)
    277288    {
     
    309320
    310321    // Protected
     322
     323    get codeMirrorCompletionControllerMode()
     324    {
     325        // Overridden by subclasses if needed.
     326
     327        if (this._breakpoint === WI.debuggerManager.allExceptionsBreakpoint || this._breakpoint === WI.debuggerManager.uncaughtExceptionsBreakpoint)
     328            return WI.CodeMirrorCompletionController.Mode.ExceptionBreakpoint;
     329
     330        return WI.CodeMirrorCompletionController.Mode.Basic;
     331    }
    311332
    312333    populateContent()
  • trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js

    r257396 r269023  
    5757        this._codeMirror.addKeyMap(keyMap);
    5858
    59         this._completionController = new WI.CodeMirrorCompletionController(this._codeMirror, this);
     59        this._completionController = new WI.CodeMirrorCompletionController(WI.CodeMirrorCompletionController.Mode.PausedConsoleCommandLineAPI, this._codeMirror, this);
    6060        this._completionController.addExtendedCompletionProvider("javascript", WI.javaScriptRuntimeCompletionProvider);
    6161
  • trunk/Source/WebInspectorUI/UserInterface/Views/EventBreakpointPopover.js

    r266480 r269023  
    6262
    6363    // Protected
     64
     65    get codeMirrorCompletionControllerMode()
     66    {
     67        return WI.CodeMirrorCompletionController.Mode.EventBreakpoint;
     68    }
    6469
    6570    populateContent()
  • trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js

    r263115 r269023  
    380380        });
    381381
    382         let completionController = new WI.CodeMirrorCompletionController(this._codeMirror);
     382        let completionController = new WI.CodeMirrorCompletionController(WI.CodeMirrorCompletionController.Mode.FullConsoleCommandLineAPI, this._codeMirror);
    383383        completionController.addExtendedCompletionProvider("javascript", WI.javaScriptRuntimeCompletionProvider);
    384384
  • trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js

    r260589 r269023  
    4646        this._codeMirror.getScrollerElement().addEventListener("click", this._openClickedLinks.bind(this), true);
    4747
    48         this._completionController = new WI.CodeMirrorCompletionController(this._codeMirror, this);
     48        this._completionController = new WI.CodeMirrorCompletionController(WI.CodeMirrorCompletionController.Mode.Basic, this._codeMirror, this);
    4949        this._tokenTrackingController = new WI.CodeMirrorTokenTrackingController(this._codeMirror, this);
    5050
Note: See TracChangeset for help on using the changeset viewer.