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

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

Issue 2583933003: Replace deprecated Android java test annotations (Closed)
Patch Set: Rebase again :( Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.omnibox; 5 package org.chromium.chrome.browser.omnibox;
6 6
7 import android.test.suitebuilder.annotation.SmallTest; 7 import android.support.test.filters.SmallTest;
8 8
9 import junit.framework.TestCase; 9 import junit.framework.TestCase;
10 10
11 public class SuggestionAnswerTest extends TestCase { 11 public class SuggestionAnswerTest extends TestCase {
12 @SmallTest 12 @SmallTest
13 public void testMalformedJsonReturnsNull() { 13 public void testMalformedJsonReturnsNull() {
14 String json = "} malformed json {"; 14 String json = "} malformed json {";
15 SuggestionAnswer answer = SuggestionAnswer.parseAnswerContents(json); 15 SuggestionAnswer answer = SuggestionAnswer.parseAnswerContents(json);
16 assertNull(answer); 16 assertNull(answer);
17 } 17 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 assertEquals(7, firstLine.getAdditionalText().getType()); 110 assertEquals(7, firstLine.getAdditionalText().getType());
111 111
112 SuggestionAnswer.ImageLine secondLine = answer.getSecondLine(); 112 SuggestionAnswer.ImageLine secondLine = answer.getSecondLine();
113 assertEquals("ftw", secondLine.getTextFields().get(0).getText()); 113 assertEquals("ftw", secondLine.getTextFields().get(0).getText());
114 assertEquals(6006, secondLine.getTextFields().get(0).getType()); 114 assertEquals(6006, secondLine.getTextFields().get(0).getType());
115 assertEquals("shop S-Mart", secondLine.getStatusText().getText()); 115 assertEquals("shop S-Mart", secondLine.getStatusText().getText());
116 assertEquals(666, secondLine.getStatusText().getType()); 116 assertEquals(666, secondLine.getStatusText().getType());
117 assertEquals("Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGlj", secondLine.getIma ge()); 117 assertEquals("Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGlj", secondLine.getIma ge());
118 } 118 }
119 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698