fix testDialogWorks

GitOrigin-RevId: 0610e4b8b126acc129878f9720257ccd683b10d5
This commit is contained in:
Vladimir Krivosheev
2020-01-09 19:08:43 +00:00
committed by intellij-monorepo-bot
parent 2fe9041e6a
commit 1e4d3885ed
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.history.integration.ui.views;
@@ -24,6 +10,7 @@ import com.intellij.history.integration.IdeaGateway;
import com.intellij.history.integration.ui.models.EntireFileHistoryDialogModel;
import com.intellij.history.integration.ui.models.FileDifferenceModel;
import com.intellij.history.integration.ui.models.FileHistoryDialogModel;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Pair;
@@ -53,7 +40,7 @@ public class FileHistoryDialog extends HistoryDialog<FileHistoryDialogModel> {
@Override
protected Pair<JComponent, Dimension> createDiffPanel(JPanel root, ExcludingTraversalPolicy traversalPolicy) {
myDiffPanel = DiffManager.getInstance().createRequestPanel(myProject, this, getFrame());
myDiffPanel = DiffManager.getInstance().createRequestPanel(myProject, this, ApplicationManager.getApplication().isUnitTestMode() ? null : getFrame());
myDiffPanel.setRequest(new MessageDiffRequest(""));
return Pair.create(myDiffPanel.getComponent(), null);
}