Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3039)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/SuggestionAnswerTest.java

Issue 744453002: Fix a bunch of Java Checkstyle issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NeedsBraces to info Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/SuggestionAnswerTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/SuggestionAnswerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/SuggestionAnswerTest.java
index cdff625fda02c6845fc17e1059e88f46915b4204..19965415510e5f5713a899a9e09e566f5a1f4655 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/SuggestionAnswerTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/SuggestionAnswerTest.java
@@ -25,61 +25,56 @@ public class SuggestionAnswerTest extends TestCase {
@SmallTest
public void testOneLineReturnsNull() {
- String json =
- "{ 'l': [" +
- " { 'il': { 't': [{ 't': 'text', 'tt': 8 }] } }, " +
- "] }";
+ String json = "{ 'l': ["
+ + " { 'il': { 't': [{ 't': 'text', 'tt': 8 }] } }, "
+ + "] }";
SuggestionAnswer answer = SuggestionAnswer.parseAnswerContents(json);
assertNull(answer);
}
@SmallTest
public void testTwoLinesDoesntReturnNull() {
- String json =
- "{ 'l': [" +
- " { 'il': { 't': [{ 't': 'text', 'tt': 8 }] } }, " +
- " { 'il': { 't': [{ 't': 'other text', 'tt': 5 }] } }" +
- "] }";
+ String json = "{ 'l': ["
+ + " { 'il': { 't': [{ 't': 'text', 'tt': 8 }] } }, "
+ + " { 'il': { 't': [{ 't': 'other text', 'tt': 5 }] } }"
+ + "] }";
SuggestionAnswer answer = SuggestionAnswer.parseAnswerContents(json);
assertNotNull(answer);
}
@SmallTest
public void testThreeLinesReturnsNull() {
- String json =
- "{ 'l': [" +
- " { 'il': { 't': [{ 't': 'text', 'tt': 8 }] } }, " +
- " { 'il': { 't': [{ 't': 'other text', 'tt': 5 }] } }" +
- " { 'il': { 't': [{ 't': 'yet more text', 'tt': 13 }] } }" +
- "] }";
+ String json = "{ 'l': ["
+ + " { 'il': { 't': [{ 't': 'text', 'tt': 8 }] } }, "
+ + " { 'il': { 't': [{ 't': 'other text', 'tt': 5 }] } }"
+ + " { 'il': { 't': [{ 't': 'yet more text', 'tt': 13 }] } }"
+ + "] }";
SuggestionAnswer answer = SuggestionAnswer.parseAnswerContents(json);
assertNull(answer);
}
@SmallTest
public void testFiveLinesReturnsNull() {
- String json =
- "{ 'l': [" +
- " { 'il': { 't': [{ 't': 'line 1', 'tt': 0 }] } }, " +
- " { 'il': { 't': [{ 't': 'line 2', 'tt': 5 }] } }" +
- " { 'il': { 't': [{ 't': 'line 3', 'tt': 13 }] } }" +
- " { 'il': { 't': [{ 't': 'line 4', 'tt': 14 }] } }" +
- " { 'il': { 't': [{ 't': 'line 5', 'tt': 5 }] } }" +
- "] }";
+ String json = "{ 'l': ["
+ + " { 'il': { 't': [{ 't': 'line 1', 'tt': 0 }] } }, "
+ + " { 'il': { 't': [{ 't': 'line 2', 'tt': 5 }] } }"
+ + " { 'il': { 't': [{ 't': 'line 3', 'tt': 13 }] } }"
+ + " { 'il': { 't': [{ 't': 'line 4', 'tt': 14 }] } }"
+ + " { 'il': { 't': [{ 't': 'line 5', 'tt': 5 }] } }"
+ + "] }";
SuggestionAnswer answer = SuggestionAnswer.parseAnswerContents(json);
assertNull(answer);
}
@SmallTest
public void testPropertyPresence() {
- String json =
- "{ 'l': [" +
- " { 'il': { 't': [{ 't': 'text', 'tt': 8 }, { 't': 'moar', 'tt': 0 }], " +
- " 'i': { 'd': 'http://example.com/foo.jpg' } } }, " +
- " { 'il': { 't': [{ 't': 'other text', 'tt': 5 }], " +
- " 'at': { 't': 'slatfotf', 'tt': 42 }, " +
- " 'st': { 't': 'oh hi, Mark', 'tt': 7666 } } } " +
- "] }";
+ String json = "{ 'l': ["
+ + " { 'il': { 't': [{ 't': 'text', 'tt': 8 }, { 't': 'moar', 'tt': 0 }], "
+ + " 'i': { 'd': 'http://example.com/foo.jpg' } } }, "
+ + " { 'il': { 't': [{ 't': 'other text', 'tt': 5 }], "
+ + " 'at': { 't': 'slatfotf', 'tt': 42 }, "
+ + " 'st': { 't': 'oh hi, Mark', 'tt': 7666 } } } "
+ + "] }";
SuggestionAnswer answer = SuggestionAnswer.parseAnswerContents(json);
SuggestionAnswer.ImageLine firstLine = answer.getFirstLine();
@@ -97,14 +92,13 @@ public class SuggestionAnswerTest extends TestCase {
@SmallTest
public void testContents() {
- String json =
- "{ 'l': [" +
- " { 'il': { 't': [{ 't': 'text', 'tt': 8 }, { 't': 'moar', 'tt': 0 }], " +
- " 'at': { 't': 'hi there', 'tt': 7 } } }, " +
- " { 'il': { 't': [{ 't': 'ftw', 'tt': 6006 }], " +
- " 'st': { 't': 'shop S-Mart', 'tt': 666 }, " +
- " 'i': { 'd': 'Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGlj' } } } " +
- "] }";
+ String json = "{ 'l': ["
+ + " { 'il': { 't': [{ 't': 'text', 'tt': 8 }, { 't': 'moar', 'tt': 0 }], "
+ + " 'at': { 't': 'hi there', 'tt': 7 } } }, "
+ + " { 'il': { 't': [{ 't': 'ftw', 'tt': 6006 }], "
+ + " 'st': { 't': 'shop S-Mart', 'tt': 666 }, "
+ + " 'i': { 'd': 'Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGlj' } } } "
+ + "] }";
SuggestionAnswer answer = SuggestionAnswer.parseAnswerContents(json);
SuggestionAnswer.ImageLine firstLine = answer.getFirstLine();

Powered by Google App Engine
This is Rietveld 408576698