@@ -22,55 +22,24 @@ function getValue(dbg, index) {
2222}
2323
2424async function addExpression ( dbg , input ) {
25- info ( "Adding an expression" ) ;
26- findElementWithSelector ( dbg , expressionSelectors . input ) . focus ( ) ;
27- type ( dbg , input ) ;
28- pressKey ( dbg , "Enter" ) ;
29- await waitForDispatch ( dbg , "EVALUATE_EXPRESSION" ) ;
30- }
31-
32- async function editExpression ( dbg , input ) {
33- info ( "updating the expression" ) ;
34- dblClickElement ( dbg , "expressionNode" , 1 ) ;
35- // Position cursor reliably at the end of the text.
36- const evaluation = waitForDispatch ( dbg , "EVALUATE_EXPRESSION" ) ;
37- pressKey ( dbg , "End" ) ;
38- type ( dbg , input ) ;
39- pressKey ( dbg , "Enter" ) ;
40- await evaluation ;
41- }
42-
43- /*
44- * When we add a bad expression, we'll pause,
45- * resume, and wait for the expression to finish being evaluated.
46- */
47- async function addBadExpression ( dbg , input ) {
4825 const evaluation = waitForDispatch ( dbg , "EVALUATE_EXPRESSION" ) ;
49-
5026 findElementWithSelector ( dbg , expressionSelectors . input ) . focus ( ) ;
5127 type ( dbg , input ) ;
5228 pressKey ( dbg , "Enter" ) ;
53-
54- await waitForPaused ( dbg ) ;
55-
56- ok ( dbg . selectors . isEvaluatingExpression ( dbg . getState ( ) ) ) ;
57- await resume ( dbg ) ;
5829 await evaluation ;
5930}
6031
6132add_task ( async function ( ) {
6233 const dbg = await initDebugger ( "doc-script-switching.html" ) ;
6334
64- const onPausedOnException = togglePauseOnExceptions ( dbg , true , false ) ;
35+ await togglePauseOnExceptions ( dbg , true , false ) ;
6536
6637 // add a good expression, 2 bad expressions, and another good one
6738 await addExpression ( dbg , "location" ) ;
68- await addBadExpression ( dbg , "foo.bar" ) ;
69- await addBadExpression ( dbg , "foo.batt" ) ;
39+ await addExpression ( dbg , "foo.bar" ) ;
40+ await addExpression ( dbg , "foo.batt" ) ;
7041 await addExpression ( dbg , "2" ) ;
7142
72- await onPausedOnException ;
73-
7443 // check the value of
7544 is ( getValue ( dbg , 2 ) , "(unavailable)" ) ;
7645 is ( getValue ( dbg , 3 ) , "(unavailable)" ) ;
0 commit comments