NetworkProfilerStage extends StreamingStage implements CodeNavigator.Listener { @NotNull public StackTraceModel getStackTraceModel() { return myStackTraceModel; } NetworkProfilerStage(StudioProfilers profilers); boolean hasUserUsedNetworkSelection(); @NotNull NetworkConnectionsModel getConnectionsModel(); @NotNull RangeSelectionModel getRangeSelectionModel(); @NotNull StackTraceModel getStackTraceModel(); @NotNull HttpDataFetcher getHttpDataFetcher(); boolean setSelectedConnection(@Nullable HttpData data); @Nullable HttpData getSelectedConnection(); @NotNull AspectModel<NetworkProfilerAspect> getAspect(); @Override void enter(); @Override void exit(); @NotNull String getName(); @NotNull DetailedNetworkUsage getDetailedNetworkUsage(); @NotNull AxisComponentModel getTrafficAxis(); @NotNull AxisComponentModel getConnectionsAxis(); @NotNull NetworkStageLegends getLegends(); @NotNull NetworkStageLegends getTooltipLegends(); @NotNull EaseOutModel getInstructionsEaseOutModel(); @NotNull EventMonitor getEventMonitor(); @Override void onNavigated(@NotNull CodeLocation location);  }
@Test public void codeNavigationUnexpandsProfiler() { HttpData data = FAKE_HTTP_DATA.get(0); StackTrace stackTrace = new StackTrace(data); assertThat(stackTrace.getTrace()).isEqualTo(data.getTrace()); assertThat(stackTrace.getCodeLocations()).hasSize(2); myStage.getStackTraceModel().setStackFrames(stackTrace.getTrace()); assertThat(myStage.getProfilerMode()).isEqualTo(ProfilerMode.NORMAL); myStage.getTimeline().getSelectionRange().set(0, 10); assertThat(myStage.getProfilerMode()).isEqualTo(ProfilerMode.EXPANDED); myStage.getStackTraceModel().setSelectedIndex(0); assertThat(myStage.getProfilerMode()).isEqualTo(ProfilerMode.NORMAL); }