| 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 src="../../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/network-test.js"></script> | 5 <script src="../../../http/tests/inspector/network-test.js"></script> |
| 6 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 6 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function testFunction() | 9 function testFunction() |
| 10 { | 10 { |
| 11 var x = Math.sqrt(16); | 11 var x = Math.sqrt(16); |
| 12 debugger; | 12 debugger; |
| 13 return x; | 13 return x; |
| 14 } | 14 } |
| 15 | 15 |
| 16 function test() | 16 function test() |
| 17 { | 17 { |
| 18 InspectorTest.setQuiet(true); | 18 InspectorTest.setQuiet(true); |
| 19 InspectorTest.startDebuggerTest(step1); | 19 InspectorTest.startDebuggerTest(step1); |
| 20 var updateCount = 8; | 20 var updateCount = 8; |
| 21 | 21 |
| 22 WebInspector.settings.createLocalSetting("watchExpressions", []).set(["x", "
y.foo"]); | 22 Common.settings.createLocalSetting("watchExpressions", []).set(["x", "y.foo"
]); |
| 23 | 23 |
| 24 function step1() | 24 function step1() |
| 25 { | 25 { |
| 26 watchExpressionsPane = self.runtime.sharedInstance(WebInspector.WatchExp
ressionsSidebarPane); | 26 watchExpressionsPane = self.runtime.sharedInstance(Sources.WatchExpressi
onsSidebarPane); |
| 27 WebInspector.panels.sources._sidebarPaneStack.showView(WebInspector.pane
ls.sources._watchSidebarPane).then(() => { | 27 UI.panels.sources._sidebarPaneStack.showView(UI.panels.sources._watchSid
ebarPane).then(() => { |
| 28 InspectorTest.addSniffer(WebInspector.WatchExpression.prototype, "_c
reateWatchExpression", watchExpressionsUpdated, true); | 28 InspectorTest.addSniffer(Sources.WatchExpression.prototype, "_create
WatchExpression", watchExpressionsUpdated, true); |
| 29 InspectorTest.evaluateInPage("testFunction()"); | 29 InspectorTest.evaluateInPage("testFunction()"); |
| 30 }); | 30 }); |
| 31 } | 31 } |
| 32 | 32 |
| 33 function watchExpressionsUpdated(result, wasThrown) | 33 function watchExpressionsUpdated(result, wasThrown) |
| 34 { | 34 { |
| 35 InspectorTest.addResult(this._element.deepTextContent()); | 35 InspectorTest.addResult(this._element.deepTextContent()); |
| 36 if (--updateCount === 0) | 36 if (--updateCount === 0) |
| 37 InspectorTest.completeDebuggerTest(); | 37 InspectorTest.completeDebuggerTest(); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 </script> | 41 </script> |
| 42 </head> | 42 </head> |
| 43 <body onload="runTest()"> | 43 <body onload="runTest()"> |
| 44 <p>Tests debugger does not fail when stopped while a panel other than scripts wa
s opened. Both valid and invalid expressions are added to watch expressions.</p> | 44 <p>Tests debugger does not fail when stopped while a panel other than scripts wa
s opened. Both valid and invalid expressions are added to watch expressions.</p> |
| 45 <a href="https://bugs.webkit.org/show_bug.cgi?id=70718">Bug 70718</a> | 45 <a href="https://bugs.webkit.org/show_bug.cgi?id=70718">Bug 70718</a> |
| 46 </body> | 46 </body> |
| 47 </html> | 47 </html> |
| OLD | NEW |