Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java

Issue 29348972: Issue 4239 - Change indentation to reflect our coding style (Closed)
Patch Set: Created Aug. 2, 2016, 10:43 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java
diff --git a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java
index 94a47d960cc949e3fed1c2e2581b24fddd50e48d..5547511da3fdbbd0e7ae61a7b806cc4c8748c80e 100644
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java
@@ -24,79 +24,79 @@ import org.junit.Test;
public class ConsoleJsObjectTest extends BaseJsTest
{
- protected MockLogSystem mockLogSystem;
+ protected MockLogSystem mockLogSystem;
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
- mockLogSystem = new MockLogSystem();
- jsEngine.setLogSystem(mockLogSystem);
- }
+ mockLogSystem = new MockLogSystem();
+ jsEngine.setLogSystem(mockLogSystem);
+ }
- @Test
- public void testConsoleLogCall()
- {
- jsEngine.evaluate("\n\nconsole.log('foo', 'bar');\n\n", "eval");
- assertEquals(LogSystem.LogLevel.LOG, mockLogSystem.getLastLogLevel());
- assertEquals("foo bar", mockLogSystem.getLastMessage());
- assertEquals("eval:3", mockLogSystem.getLastSource());
- }
+ @Test
+ public void testConsoleLogCall()
+ {
+ jsEngine.evaluate("\n\nconsole.log('foo', 'bar');\n\n", "eval");
+ assertEquals(LogSystem.LogLevel.LOG, mockLogSystem.getLastLogLevel());
+ assertEquals("foo bar", mockLogSystem.getLastMessage());
+ assertEquals("eval:3", mockLogSystem.getLastSource());
+ }
- @Test
- public void testConsoleDebugCall()
- {
- jsEngine.evaluate("console.debug('foo', 'bar')");
- assertEquals(LogSystem.LogLevel.LOG, mockLogSystem.getLastLogLevel());
- assertEquals("foo bar", mockLogSystem.getLastMessage());
- assertEquals(":1", mockLogSystem.getLastSource());
- }
+ @Test
+ public void testConsoleDebugCall()
+ {
+ jsEngine.evaluate("console.debug('foo', 'bar')");
+ assertEquals(LogSystem.LogLevel.LOG, mockLogSystem.getLastLogLevel());
+ assertEquals("foo bar", mockLogSystem.getLastMessage());
+ assertEquals(":1", mockLogSystem.getLastSource());
+ }
- @Test
- public void testConsoleInfoCall()
- {
- jsEngine.evaluate("console.info('foo', 'bar')");
- assertEquals(LogSystem.LogLevel.INFO, mockLogSystem.getLastLogLevel());
- assertEquals("foo bar", mockLogSystem.getLastMessage());
- assertEquals(":1", mockLogSystem.getLastSource());
- }
+ @Test
+ public void testConsoleInfoCall()
+ {
+ jsEngine.evaluate("console.info('foo', 'bar')");
+ assertEquals(LogSystem.LogLevel.INFO, mockLogSystem.getLastLogLevel());
+ assertEquals("foo bar", mockLogSystem.getLastMessage());
+ assertEquals(":1", mockLogSystem.getLastSource());
+ }
- @Test
- public void testConsoleWarnCall()
- {
- jsEngine.evaluate("console.warn('foo', 'bar')");
- assertEquals(LogSystem.LogLevel.WARN, mockLogSystem.getLastLogLevel());
- assertEquals("foo bar", mockLogSystem.getLastMessage());
- assertEquals(":1", mockLogSystem.getLastSource());
- }
+ @Test
+ public void testConsoleWarnCall()
+ {
+ jsEngine.evaluate("console.warn('foo', 'bar')");
+ assertEquals(LogSystem.LogLevel.WARN, mockLogSystem.getLastLogLevel());
+ assertEquals("foo bar", mockLogSystem.getLastMessage());
+ assertEquals(":1", mockLogSystem.getLastSource());
+ }
- @Test
- public void testConsoleErrorCall()
- {
- jsEngine.evaluate("console.error('foo', 'bar')");
- assertEquals(LogSystem.LogLevel.ERROR, mockLogSystem.getLastLogLevel());
- assertEquals("foo bar", mockLogSystem.getLastMessage());
- assertEquals(":1", mockLogSystem.getLastSource());
- }
+ @Test
+ public void testConsoleErrorCall()
+ {
+ jsEngine.evaluate("console.error('foo', 'bar')");
+ assertEquals(LogSystem.LogLevel.ERROR, mockLogSystem.getLastLogLevel());
+ assertEquals("foo bar", mockLogSystem.getLastMessage());
+ assertEquals(":1", mockLogSystem.getLastSource());
+ }
- @Test
- public void testConsoleTraceCall()
- {
- jsEngine.evaluate(
- "\n" +
- "function foo()\n" +
- "{\n" +
- " (function() {\n" +
- " console.trace();\n" +
- " })();\n" +
- "}\n" +
- "foo();", "eval");
- assertEquals(LogSystem.LogLevel.TRACE, mockLogSystem.getLastLogLevel());
- assertEquals(
- "1: /* anonymous */() at eval:5\n" +
- "2: foo() at eval:6\n" +
- "3: /* anonymous */() at eval:8\n", mockLogSystem.getLastMessage());
- assertEquals("", mockLogSystem.getLastSource());
- }
+ @Test
+ public void testConsoleTraceCall()
+ {
+ jsEngine.evaluate(
+ "\n" +
+ "function foo()\n" +
+ "{\n" +
+ " (function() {\n" +
+ " console.trace();\n" +
+ " })();\n" +
+ "}\n" +
+ "foo();", "eval");
+ assertEquals(LogSystem.LogLevel.TRACE, mockLogSystem.getLastLogLevel());
+ assertEquals(
+ "1: /* anonymous */() at eval:5\n" +
+ "2: foo() at eval:6\n" +
+ "3: /* anonymous */() at eval:8\n", mockLogSystem.getLastMessage());
+ assertEquals("", mockLogSystem.getLastSource());
+ }
}

Powered by Google App Engine
This is Rietveld