OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script> | 4 <script> |
5 | 5 |
6 var foo = 123 | 6 var foo = 123 |
7 | 7 |
8 var test = function() | 8 var test = function() |
9 { | 9 { |
| 10 // We need to initialize scripts panel so that watch expressions section is
created. |
| 11 WebInspector.showPanel("scripts"); |
| 12 |
10 var watchExpressionsSection = WebInspector.panels.scripts.sidebarPanes.watch
Expressions.section; | 13 var watchExpressionsSection = WebInspector.panels.scripts.sidebarPanes.watch
Expressions.section; |
11 watchExpressionsSection.addExpression(); | 14 watchExpressionsSection.watchExpressions = []; |
12 watchExpressionsSection.watchExpressions[0] = "#$%"; | 15 watchExpressionsSection.watchExpressions.push("#$%"); |
13 watchExpressionsSection.update(); | 16 watchExpressionsSection.update(); |
| 17 |
14 InspectorTest.runAfterPendingDispatches(step1); | 18 InspectorTest.runAfterPendingDispatches(step1); |
15 | 19 |
16 function step1() | 20 function step1() |
17 { | 21 { |
18 InspectorTest.addResult(watchExpressionsSection.element.innerHTML.indexO
f("watch-expressions-error-level") !== -1 ? "SUCCESS" : "FAILED"); | 22 InspectorTest.addResult(watchExpressionsSection.element.innerHTML.indexO
f("watch-expressions-error-level") !== -1 ? "SUCCESS" : "FAILED"); |
| 23 |
| 24 // Clear watch expressions after execution. |
| 25 watchExpressionsSection.watchExpressions = []; |
| 26 watchExpressionsSection.update(); |
| 27 |
19 InspectorTest.completeTest(); | 28 InspectorTest.completeTest(); |
20 } | 29 } |
21 } | 30 } |
22 | 31 |
23 </script> | 32 </script> |
24 </head> | 33 </head> |
25 | 34 |
26 <body onload="runTest()"> | 35 <body onload="runTest()"> |
27 <p> | 36 <p> |
28 Tests that watches pane renders errors in red. | 37 Tests that watches pane renders errors in red. |
29 </p> | 38 </p> |
30 | 39 |
31 </body> | 40 </body> |
32 </html> | 41 </html> |
OLD | NEW |