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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/omaha/StringSanitizerTest.java

Issue 2766373004: Convert the rest of chrome_public_test_apk InstrumentationTestCases to JUnit4 (Closed)
Patch Set: nits and rebase Created 3 years, 8 months 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.omaha; 5 package org.chromium.chrome.browser.omaha;
6 6
7 import android.support.test.filters.SmallTest; 7 import android.support.test.filters.SmallTest;
8 import android.test.InstrumentationTestCase; 8
9 import org.junit.Assert;
10 import org.junit.Test;
11 import org.junit.runner.RunWith;
9 12
10 import org.chromium.base.test.util.Feature; 13 import org.chromium.base.test.util.Feature;
14 import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
11 15
12 /** Tests the Omaha StringSanitizer. */ 16 /** Tests the Omaha StringSanitizer. */
13 public class StringSanitizerTest extends InstrumentationTestCase { 17 @RunWith(ChromeJUnit4ClassRunner.class)
18 public class StringSanitizerTest {
19 @Test
14 @SmallTest 20 @SmallTest
15 @Feature({"Omaha"}) 21 @Feature({"Omaha"})
16 public void testSanitizeStrings() { 22 public void testSanitizeStrings() {
17 assertEquals("normal string", StringSanitizer.sanitize("Normal string")) ; 23 Assert.assertEquals("normal string", StringSanitizer.sanitize("Normal st ring"));
18 assertEquals("extra spaces string", 24 Assert.assertEquals(
19 StringSanitizer.sanitize("\nExtra, spaces; string ")); 25 "extra spaces string", StringSanitizer.sanitize("\nExtra, space s; string "));
20 assertEquals("a quick brown fox jumped over the lazy dog", 26 Assert.assertEquals("a quick brown fox jumped over the lazy dog",
21 StringSanitizer.sanitize(" a\"quick; brown,fox'jumped;over \nt he\rlazy\tdog\n")); 27 StringSanitizer.sanitize(" a\"quick; brown,fox'jumped;over \nt he\rlazy\tdog\n"));
22 } 28 }
23 } 29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698