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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeArrayCoercionTest.java

Issue 2766393004: Convert most of the rest of instrumentation tests in content (Closed)
Patch Set: 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.support.test.filters.SmallTest; 7 import android.support.test.filters.SmallTest;
8 8
9 import org.junit.Assert; 9 import org.junit.Assert;
10 import org.junit.Before; 10 import org.junit.Before;
(...skipping 15 matching lines...) Expand all
26 * which the implementation differs from the spec are marked with 26 * which the implementation differs from the spec are marked with
27 * LIVECONNECT_COMPLIANCE. 27 * LIVECONNECT_COMPLIANCE.
28 * FIXME: Consider making our implementation more compliant, if it will not 28 * FIXME: Consider making our implementation more compliant, if it will not
29 * break backwards-compatibility. See b/4408210. 29 * break backwards-compatibility. See b/4408210.
30 */ 30 */
31 @RunWith(BaseJUnit4ClassRunner.class) 31 @RunWith(BaseJUnit4ClassRunner.class)
32 public class JavaBridgeArrayCoercionTest { 32 public class JavaBridgeArrayCoercionTest {
33 private static final double ASSERTION_DELTA = 0; 33 private static final double ASSERTION_DELTA = 0;
34 34
35 @Rule 35 @Rule
36 public JavaBridgeActivityTestRule mActivityTestRule = new JavaBridgeActivity TestRule(); 36 public JavaBridgeActivityTestRule mActivityTestRule =
37 new JavaBridgeActivityTestRule().shouldSetUp(true);
37 38
38 @SuppressFBWarnings("CHROMIUM_SYNCHRONIZED_METHOD") 39 @SuppressFBWarnings("CHROMIUM_SYNCHRONIZED_METHOD")
39 private static class TestObject extends Controller { 40 private static class TestObject extends Controller {
40 private final Object mObjectInstance; 41 private final Object mObjectInstance;
41 private final CustomType mCustomTypeInstance; 42 private final CustomType mCustomTypeInstance;
42 43
43 private boolean[] mBooleanArray; 44 private boolean[] mBooleanArray;
44 private byte[] mByteArray; 45 private byte[] mByteArray;
45 private char[] mCharArray; 46 private char[] mCharArray;
46 private short[] mShortArray; 47 private short[] mShortArray;
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 mActivityTestRule.executeJavaScript("testObject.setObjectArray(float64_a rray);"); 1004 mActivityTestRule.executeJavaScript("testObject.setObjectArray(float64_a rray);");
1004 Assert.assertNull(mTestObject.waitForObjectArray()); 1005 Assert.assertNull(mTestObject.waitForObjectArray());
1005 1006
1006 mActivityTestRule.executeJavaScript("testObject.setStringArray(float64_a rray);"); 1007 mActivityTestRule.executeJavaScript("testObject.setStringArray(float64_a rray);");
1007 Assert.assertNull(mTestObject.waitForStringArray()[0]); 1008 Assert.assertNull(mTestObject.waitForStringArray()[0]);
1008 1009
1009 mActivityTestRule.executeJavaScript("testObject.setCustomTypeArray(float 64_array);"); 1010 mActivityTestRule.executeJavaScript("testObject.setCustomTypeArray(float 64_array);");
1010 Assert.assertNull(mTestObject.waitForCustomTypeArray()); 1011 Assert.assertNull(mTestObject.waitForCustomTypeArray());
1011 } 1012 }
1012 } 1013 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698