blob: d71aa3b25e87f23373150d7f6f3bedd0a4b6c641 [file] [log] [blame]
/*
* Copyright 2000-2014 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.
*/
package com.intellij.xml.structureView;
import com.intellij.ide.util.PropertiesComponent;
import com.intellij.ide.util.treeView.smartTree.TreeStructureUtil;
import com.intellij.lang.html.structureView.Html5SectionsNodeProvider;
import com.intellij.testFramework.FileStructureTestBase;
public class HtmlFileStructureTest extends FileStructureTestBase {
private boolean myHtml5OutlineModeDefault;
@Override
public void setUp() throws Exception {
super.setUp();
myHtml5OutlineModeDefault = PropertiesComponent.getInstance().getBoolean(getHtml5OutlineModePropertyName(), false);
setHtml5OutlineMode(true);
}
@Override
public void tearDown() throws Exception {
PropertiesComponent.getInstance().setValue(getHtml5OutlineModePropertyName(), String.valueOf(myHtml5OutlineModeDefault));
super.tearDown();
}
private static String getHtml5OutlineModePropertyName() {
return TreeStructureUtil.getPropertyName(Html5SectionsNodeProvider.HTML5_OUTLINE_PROVIDER_PROPERTY);
}
@Override
protected String getFileExtension() {
return "html";
}
@Override
protected String getBasePath() {
return "/xml/tests/testData/structureView/";
}
@Override
protected boolean isCommunity() {
return true;
}
public void setHtml5OutlineMode(boolean enabled) throws Exception {
myPopup.setTreeActionState(Html5SectionsNodeProvider.class, enabled);
update();
}
public void testEmpty() throws Exception {checkTree();}
public void testSimple() throws Exception {checkTree();}
public void testNoSectioningRoot() throws Exception {checkTree();}
public void testImplicitSections() throws Exception {checkTree();}
public void testMultipleRootTags() throws Exception {checkTree();}
}