| Index: LayoutTests/dart/inspector/scope-variables.html
|
| diff --git a/LayoutTests/dart/inspector/scope-variables.html b/LayoutTests/dart/inspector/scope-variables.html
|
| index 44b6a7c4e63e47f3767502562a3f65be2b62aa41..b0f4d14bb16ce5c264a23c022656be6de7b7c641 100644
|
| --- a/LayoutTests/dart/inspector/scope-variables.html
|
| +++ b/LayoutTests/dart/inspector/scope-variables.html
|
| @@ -17,6 +17,20 @@ function testFunction() {
|
|
|
| function test()
|
| {
|
| + var realAddResult = InspectorTest.addResult;
|
| + // Inject name mangling for Dart more deeply in the existing JS test
|
| + // framework to reduce the amount of code that we need to duplicate from
|
| + // the JS side.
|
| + InspectorTest.addResult = function(text) {
|
| + text = text.replace(/(file:\/\/\/\w):/g, "$1");
|
| + text = text.replace(/file:\/\/\/?[^: )]*([.]dart|[$]script|[$]trampoline)/g, "(SOURCE_LOCATION)");
|
| + text = text.replace(/\(file:\/\/\/?[^)]*\)/g, "(SOURCE_LOCATION)");
|
| + text = text.replace(/@\d+/g, "(VM_PRIVATE_MANGLING)");
|
| + text = text.replace(/\$main\-[0-9]*/g, "(DEFAULT_ISOLATE_NAME_SUFFIX)");
|
| + text = text.replace(/:\d\d\d+/g, ":xxxx");
|
| + return realAddResult.call(this, text);
|
| + };
|
| +
|
| var panel = WebInspector.inspectorView.showPanel("sources");
|
| InspectorTest.runDebuggerTestSuite([
|
| function testScopeChain(next)
|
| @@ -38,33 +52,7 @@ function test()
|
|
|
| function didExpandScopeChainSections()
|
| {
|
| - dumpScopeChainContents();
|
| - var sections = WebInspector.inspectorView.currentPanel().sidebarPanes.scopechain._sections;
|
| - for (var s = 0; s < sections.length; s++) {
|
| - var section = sections[s];
|
| -
|
| - var properties = section.propertiesForTest;
|
| - for (var i = 0; i < properties.length; ++i) {
|
| - if (properties[i].name == 'a1') {
|
| - var objectId = properties[i].value._objectId;
|
| - RuntimeAgent.callFunctionOn(objectId, "(){return this.toString();}", [], undefined, didCallFunctionOn);
|
| - RuntimeAgent.callFunctionOn(objectId, "function(){return this.toString();}", [], undefined, didCallInvalidFunctionOn);
|
| - break;
|
| - }
|
| - }
|
| - if (!section.expanded)
|
| - InspectorTest.addResult(" <section collapsed>");
|
| - }
|
| - }
|
| -
|
| - function didCallFunctionOn(error, result, wasThrown)
|
| - {
|
| - InspectorTest.addResult("Inspected value toString(): " + result.value);
|
| - InspectorTest.resumeExecution(next);
|
| - }
|
| - function didCallInvalidFunctionOn(error, result, wasThrown)
|
| - {
|
| - InspectorTest.addResult("Result of calling invalid function. value: " + result.value + ". exception thrown: " + wasThrown);
|
| + InspectorTest.dumpScopeVariablesSidebarPane();
|
| InspectorTest.resumeExecution(next);
|
| }
|
| }
|
| @@ -77,24 +65,6 @@ function test()
|
| sections[i].expand();
|
| }
|
|
|
| - function dumpScopeChainContents()
|
| - {
|
| - var sections = WebInspector.inspectorView.currentPanel().sidebarPanes.scopechain._sections;
|
| - InspectorTest.addResult("");
|
| - InspectorTest.addResult("Dump scope sections:");
|
| - for (var i = 0; i < sections.length; i++) {
|
| - var section = sections[i];
|
| - var properties = section.propertiesForTest;
|
| - var contents = InspectorTest.textContentWithLineBreaks(section.element);
|
| - contents = contents.replace(/(file:\/\/\/\w):/g, "$1");
|
| - contents = contents.replace(/file:\/\/\/?[^: )]*([.]dart|[$]script|[$]trampoline)/g, "(SOURCE_LOCATION)");
|
| - contents = contents.replace(/\(file:\/\/\/?[^)]*\)/g, "(SOURCE_LOCATION)");
|
| - contents = contents.replace(/@\d+/g, "(VM_PRIVATE_MANGLING)");
|
| - contents = contents.replace(/\$main\-[0-9]*/g, "(DEFAULT_ISOLATE_NAME_SUFFIX)");
|
| - InspectorTest.addResult(contents);
|
| - }
|
| - }
|
| -
|
| function setBreakpointAndWaitUntilPaused(sourceFrame, lineNumber, pausedCallback)
|
| {
|
| var expectedBreakpointId;
|
|
|