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

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

Issue 1000793002: [Android] Incorporate findbugs into android builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address cjhopman's comment + rebase Created 5 years, 9 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.test.suitebuilder.annotation.SmallTest; 7 import android.test.suitebuilder.annotation.SmallTest;
8 8
9 import org.chromium.base.annotations.SuppressFBWarnings; 9 import org.chromium.base.annotations.SuppressFBWarnings;
10 import org.chromium.base.test.util.Feature; 10 import org.chromium.base.test.util.Feature;
11 11
12 /** 12 /**
13 * Part of the test suite for the Java Bridge. This test tests the 13 * Part of the test suite for the Java Bridge. This test tests the
14 * use of fields. 14 * use of fields.
15 */ 15 */
16 public class JavaBridgeFieldsTest extends JavaBridgeTestBase { 16 public class JavaBridgeFieldsTest extends JavaBridgeTestBase {
17 @SuppressFBWarnings("CHROMIUM_SYNCHRONIZED_METHOD") 17 @SuppressFBWarnings({
18 "CHROMIUM_SYNCHRONIZED_METHOD",
19 "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"})
18 private class TestObject extends Controller { 20 private class TestObject extends Controller {
19 private String mStringValue; 21 private String mStringValue;
20 22
21 // These methods are used to control the test. 23 // These methods are used to control the test.
22 public synchronized void setStringValue(String x) { 24 public synchronized void setStringValue(String x) {
23 mStringValue = x; 25 mStringValue = x;
24 notifyResultIsReady(); 26 notifyResultIsReady();
25 } 27 }
26 public synchronized String waitForStringValue() { 28 public synchronized String waitForStringValue() {
27 waitForResult(); 29 waitForResult();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 assertEquals("undefined", 84 assertEquals("undefined",
83 executeJavaScriptAndGetStringResult("typeof testObject.doubleFie ld")); 85 executeJavaScriptAndGetStringResult("typeof testObject.doubleFie ld"));
84 assertEquals("undefined", 86 assertEquals("undefined",
85 executeJavaScriptAndGetStringResult("typeof testObject.objectFie ld")); 87 executeJavaScriptAndGetStringResult("typeof testObject.objectFie ld"));
86 assertEquals("undefined", 88 assertEquals("undefined",
87 executeJavaScriptAndGetStringResult("typeof testObject.stringFie ld")); 89 executeJavaScriptAndGetStringResult("typeof testObject.stringFie ld"));
88 assertEquals("undefined", 90 assertEquals("undefined",
89 executeJavaScriptAndGetStringResult("typeof testObject.customTyp eField")); 91 executeJavaScriptAndGetStringResult("typeof testObject.customTyp eField"));
90 } 92 }
91 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698