| 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/debugger-test.js"></script> |   4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 
|   5 <script src="resources/resolve-variable-names-compressed.js"></script> |   5 <script src="resources/resolve-this.js"></script> | 
|   6 <script> |   6 <script> | 
|   7 function test() |   7 function test() | 
|   8 { |   8 { | 
|   9     Runtime.experiments.enableForTest("resolveVariableNames"); |   9     Runtime.experiments.enableForTest("resolveVariableNames"); | 
|  10     InspectorTest.startDebuggerTest(() => InspectorTest.runTestFunctionAndWaitUn
    tilPaused()); |  | 
|  11  |  10  | 
|  12     var resolvedScopes = 0; |  11     InspectorTest.waitForScriptSource("resolve-this.ts", onSourceMapLoaded); | 
|  13     InspectorTest.addSniffer(WebInspector.SourceMapNamesResolver, "_scopeResolve
    dForTest", onScopeResolved, true); |  | 
|  14  |  12  | 
|  15     function onScopeResolved() |  13     function onSourceMapLoaded() | 
|  16     { |  14     { | 
|  17         if (++resolvedScopes === 2) |  15         InspectorTest.startDebuggerTest(() => InspectorTest.runTestFunctionAndWa
    itUntilPaused()); | 
|  18             onAllScopesResolved(); |  16         InspectorTest.addSniffer(WebInspector.ScopeChainSidebarPane.prototype, "
    _sidebarPaneUpdatedForTest", onSidebarRendered, true); | 
|  19     } |  17     } | 
|  20  |  18  | 
|  21     function onAllScopesResolved() |  19     function onSidebarRendered() | 
|  22     { |  20     { | 
|  23         InspectorTest.expandScopeVariablesSidebarPane(onSidebarsExpanded); |  21         InspectorTest.expandScopeVariablesSidebarPane(onSidebarsExpanded); | 
|  24     } |  22     } | 
|  25  |  23  | 
|  26     function onSidebarsExpanded() |  24     function onSidebarsExpanded() | 
|  27     { |  25     { | 
|  28         InspectorTest.addResult(""); |  26         InspectorTest.addResult(""); | 
|  29         InspectorTest.dumpScopeVariablesSidebarPane(); |  27         InspectorTest.dumpScopeVariablesSidebarPane(); | 
|  30         InspectorTest.completeDebuggerTest(); |  28         InspectorTest.completeDebuggerTest(); | 
|  31     } |  29     } | 
|  32 } |  30 } | 
|  33  |  31  | 
|  34 </script> |  32 </script> | 
|  35 </head> |  33 </head> | 
|  36  |  34  | 
|  37 <body onload="runTest()"> |  35 <body onload="runTest()"> | 
|  38 <p> |  36 <p> | 
|  39 Tests resolving variable names via source maps. |  37 Tests resolving this object name via source maps. | 
|  40 </p> |  38 </p> | 
|  41 </body> |  39 </body> | 
|  42 </html> |  40 </html> | 
| OLD | NEW |