| Index: plugins/org.chromium.sdk.tests/src/org/chromium/sdk/internal/v8native/DebugContextImplTest.java
|
| diff --git a/plugins/org.chromium.sdk.tests/src/org/chromium/sdk/internal/v8native/DebugContextImplTest.java b/plugins/org.chromium.sdk.tests/src/org/chromium/sdk/internal/v8native/DebugContextImplTest.java
|
| index c0e0d6469ef366713e7cb6fd60c4fe9413fd14a6..50be3c09b9475bccda7974b75371d4af2f4ab3dd 100755
|
| --- a/plugins/org.chromium.sdk.tests/src/org/chromium/sdk/internal/v8native/DebugContextImplTest.java
|
| +++ b/plugins/org.chromium.sdk.tests/src/org/chromium/sdk/internal/v8native/DebugContextImplTest.java
|
| @@ -16,6 +16,8 @@ import java.util.concurrent.CountDownLatch;
|
| import org.chromium.sdk.Breakpoint;
|
| import org.chromium.sdk.JsObject;
|
| import org.chromium.sdk.JsScope;
|
| +import org.chromium.sdk.JsScope.Declarative;
|
| +import org.chromium.sdk.JsScope.ObjectBased;
|
| import org.chromium.sdk.JsVariable;
|
| import org.chromium.sdk.DebugContext.StepAction;
|
| import org.chromium.sdk.JavascriptVm.BreakpointCallback;
|
| @@ -68,7 +70,7 @@ public class DebugContextImplTest extends AbstractAttachedTest<FakeConnection>{
|
| List<? extends JsScope> variableScopes =
|
| suspendContext.getCallFrames().get(0).getVariableScopes();
|
|
|
| - Collection<? extends JsVariable> variables = variableScopes.get(0).getVariables();
|
| + Collection<? extends JsVariable> variables = getScopeVariables(variableScopes.get(0));
|
|
|
| // This call invalidates the debug context for the "lookup" operation that is invoked
|
| // inside "ensureProperties".
|
| @@ -122,7 +124,7 @@ public class DebugContextImplTest extends AbstractAttachedTest<FakeConnection>{
|
| List<? extends JsScope> variableScopes =
|
| suspendContext.getCallFrames().get(0).getVariableScopes();
|
|
|
| - Collection<? extends JsVariable> variables = variableScopes.get(0).getVariables();
|
| + Collection<? extends JsVariable> variables = getScopeVariables(variableScopes.get(0));
|
|
|
| JsObject jsObject = variables.iterator().next().getValue().asObject();
|
| // This call should finish OK
|
| @@ -133,4 +135,19 @@ public class DebugContextImplTest extends AbstractAttachedTest<FakeConnection>{
|
| protected FakeConnection createConnection() {
|
| return new FakeConnection(messageResponder);
|
| }
|
| +
|
| + private static Collection<? extends JsVariable> getScopeVariables(JsScope scope) {
|
| + return scope.accept(new JsScope.Visitor<Collection<? extends JsVariable>>() {
|
| + @Override
|
| + public Collection<? extends JsVariable> visitDeclarative(Declarative declarativeScope) {
|
| + return declarativeScope.getVariables();
|
| + }
|
| +
|
| + @Override
|
| + public Collection<? extends JsVariable> visitObject(ObjectBased objectScope) {
|
| + return objectScope.getScopeObject().getProperties();
|
| + }
|
| +
|
| + });
|
| + }
|
| }
|
|
|