| 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-variable-names-compressed.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()); |  10     InspectorTest.waitForScriptSource("resolve-variable-names-origin.js", onSour
    ceMapLoaded); | 
 |  11  | 
 |  12     function onSourceMapLoaded() | 
 |  13     { | 
 |  14         InspectorTest.startDebuggerTest(() => InspectorTest.runTestFunctionAndWa
    itUntilPaused()); | 
 |  15         InspectorTest.addSniffer(WebInspector.SourceMapNamesResolver, "_scopeRes
    olvedForTest", onScopeResolved, true); | 
 |  16     } | 
|  11  |  17  | 
|  12     var resolvedScopes = 0; |  18     var resolvedScopes = 0; | 
|  13     InspectorTest.addSniffer(WebInspector.SourceMapNamesResolver, "_scopeResolve
    dForTest", onScopeResolved, true); |  | 
|  14  |  | 
|  15     function onScopeResolved() |  19     function onScopeResolved() | 
|  16     { |  20     { | 
|  17         if (++resolvedScopes === 2) |  21         if (++resolvedScopes === 2) | 
|  18             onAllScopesResolved(); |  22             onAllScopesResolved(); | 
|  19     } |  23     } | 
|  20  |  24  | 
|  21     function onAllScopesResolved() |  25     function onAllScopesResolved() | 
|  22     { |  26     { | 
|  23         InspectorTest.expandScopeVariablesSidebarPane(onSidebarsExpanded); |  27         InspectorTest.expandScopeVariablesSidebarPane(onSidebarsExpanded); | 
|  24     } |  28     } | 
|  25  |  29  | 
|  26     function onSidebarsExpanded() |  30     function onSidebarsExpanded() | 
|  27     { |  31     { | 
|  28         InspectorTest.addResult(""); |  32         InspectorTest.addResult(""); | 
|  29         InspectorTest.dumpScopeVariablesSidebarPane(); |  33         InspectorTest.dumpScopeVariablesSidebarPane(); | 
|  30         InspectorTest.completeDebuggerTest(); |  34         InspectorTest.completeDebuggerTest(); | 
|  31     } |  35     } | 
|  32 } |  36 } | 
|  33  |  37  | 
|  34 </script> |  38 </script> | 
|  35 </head> |  39 </head> | 
|  36  |  40  | 
|  37 <body onload="runTest()"> |  41 <body onload="runTest()"> | 
|  38 <p> |  42 <p> | 
|  39 Tests resolving variable names via source maps. |  43 Tests resolving variable names via source maps. | 
|  40 </p> |  44 </p> | 
|  41 </body> |  45 </body> | 
|  42 </html> |  46 </html> | 
| OLD | NEW |