mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Put assumeStandalone() to @Before in jcef tests
GitOrigin-RevId: 8d74845348f0f791b836cc214e411e6524c65915
This commit is contained in:
committed by
intellij-monorepo-bot
parent
056d833462
commit
1e3079313b
@@ -5,6 +5,7 @@ import com.intellij.testFramework.ApplicationRule;
|
||||
import com.intellij.ui.scale.TestScaleHelper;
|
||||
import junit.framework.TestCase;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -29,6 +30,11 @@ public class IDEA232594Test {
|
||||
|
||||
static final AtomicInteger CALLBACL_COUNT = new AtomicInteger(0);
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
TestScaleHelper.restoreProperties();
|
||||
@@ -36,8 +42,6 @@ public class IDEA232594Test {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
JBCefBrowser browser = new JBCefBrowser("chrome:version");
|
||||
|
||||
JBCefJSQuery jsQuery = JBCefJSQuery.create(browser);
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.intellij.ui.jcef;
|
||||
import com.intellij.testFramework.ApplicationRule;
|
||||
import com.intellij.ui.scale.TestScaleHelper;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -27,6 +28,11 @@ public class IDEA246306Test {
|
||||
|
||||
@ClassRule public static final ApplicationRule appRule = new ApplicationRule();
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
TestScaleHelper.restoreProperties();
|
||||
@@ -34,8 +40,6 @@ public class IDEA246306Test {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
new MyBrowser();
|
||||
new MyBrowser();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.cef.browser.CefFrame;
|
||||
import org.cef.handler.CefLoadHandler;
|
||||
import org.cef.network.CefRequest;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -32,6 +33,11 @@ public class IDEA259472Test {
|
||||
|
||||
@ClassRule public static final ApplicationRule appRule = new ApplicationRule();
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
TestScaleHelper.restoreSystemProperties();
|
||||
@@ -39,8 +45,6 @@ public class IDEA259472Test {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
CountDownLatch latch1 = new CountDownLatch(1);
|
||||
CountDownLatch latch2 = new CountDownLatch(1);
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.cef.browser.CefFrame;
|
||||
import org.cef.handler.CefLoadHandlerAdapter;
|
||||
import org.cef.network.CefRequest;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -31,6 +32,11 @@ public class IDEA261496Test {
|
||||
|
||||
@ClassRule public static final ApplicationRule appRule = new ApplicationRule();
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
TestScaleHelper.restoreSystemProperties();
|
||||
@@ -38,8 +44,6 @@ public class IDEA261496Test {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
JBCefBrowser jbCefBrowser = new JBCefBrowser("http://maps.google.com"); // heavy page
|
||||
|
||||
@@ -35,6 +35,7 @@ public class JBCefJSQueryOSRTest {
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
TestScaleHelper.setSystemProperty("ide.browser.jcef.osr.enabled", "true");
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -22,6 +22,7 @@ public class JBCefJSQueryPoolSizeKeyTest {
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
TestScaleHelper.setSystemProperty("ide.browser.jcef.jsQueryPoolSize", "1");
|
||||
}
|
||||
|
||||
@@ -32,8 +33,6 @@ public class JBCefJSQueryPoolSizeKeyTest {
|
||||
|
||||
@Test
|
||||
public void test1() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
JBCefJSQueryPoolSizePropTest.test(b -> null);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-4
@@ -5,6 +5,7 @@ import com.intellij.testFramework.ApplicationRule;
|
||||
import com.intellij.ui.jcef.JBCefClient.Properties;
|
||||
import com.intellij.ui.scale.TestScaleHelper;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -28,10 +29,13 @@ public class JBCefJSQueryPoolSizePropTest {
|
||||
|
||||
@ClassRule public static final ApplicationRule appRule = new ApplicationRule();
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test1() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
test(client -> {
|
||||
client.setProperty(Properties.JS_QUERY_POOL_SIZE, 1);
|
||||
return null;
|
||||
@@ -40,8 +44,6 @@ public class JBCefJSQueryPoolSizePropTest {
|
||||
|
||||
@Test
|
||||
public void test2() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
JBCefJSQueryPoolSizePropTest.test(client -> {
|
||||
client.setProperty(Properties.JS_QUERY_POOL_SIZE, Integer.MAX_VALUE); // stress test
|
||||
return null;
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.cef.handler.CefLoadHandler;
|
||||
import org.cef.network.CefRequest;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -51,6 +52,11 @@ public class JBCefLoadHtmlTest {
|
||||
static final CountDownLatch LATCH = new CountDownLatch(1);
|
||||
static volatile boolean testPassed;
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
TestScaleHelper.restoreProperties();
|
||||
@@ -58,8 +64,6 @@ public class JBCefLoadHtmlTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
JBCefBrowser browser = new JBCefBrowser();
|
||||
|
||||
browser.getJBCefClient().addLoadHandler(new CefLoadHandler() {
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.cef.browser.CefFrame;
|
||||
import org.cef.handler.CefLoadHandlerAdapter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -38,6 +39,11 @@ public class JBCefProxyTest {
|
||||
|
||||
@ClassRule public static final ApplicationRule appRule = new ApplicationRule();
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
TestScaleHelper.restoreSystemProperties();
|
||||
@@ -45,8 +51,6 @@ public class JBCefProxyTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
TestScaleHelper.assumeStandalone();
|
||||
|
||||
JBCefProxySettings.setTestInstance(true,
|
||||
false,
|
||||
false,
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.intellij.ui.jcef;
|
||||
|
||||
import com.intellij.testFramework.ApplicationRule;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -22,6 +23,11 @@ public class JBCefTestModeTest {
|
||||
|
||||
@ClassRule public static final ApplicationRule appRule = new ApplicationRule();
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
assumeStandalone();
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
restoreProperties();
|
||||
@@ -29,8 +35,6 @@ public class JBCefTestModeTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
assumeStandalone();
|
||||
|
||||
setRegistryProperty("ide.browser.jcef.headless.enabled", "false");
|
||||
setRegistryProperty("ide.browser.jcef.testMode.enabled", "false");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user