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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeReturnValuesTest.java

Issue 793203002: Use SuppressFBWarnings to suppress findbugs warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + landmine Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeReturnValuesTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeReturnValuesTest.java b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeReturnValuesTest.java
index dfe83ea88c30799bf9d6bf79c389c7641e222a04..309280e829feed82bb34e1b1b0026bf3a4381852 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeReturnValuesTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeReturnValuesTest.java
@@ -6,6 +6,7 @@ package org.chromium.content.browser;
import android.test.suitebuilder.annotation.SmallTest;
+import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.base.test.util.Feature;
/**
@@ -22,26 +23,27 @@ import org.chromium.base.test.util.Feature;
public class JavaBridgeReturnValuesTest extends JavaBridgeTestBase {
// An instance of this class is injected into the page to test returning
// Java values to JavaScript.
+ @SuppressFBWarnings("CHROMIUM_SYNCHRONIZED_METHOD")
private class TestObject extends Controller {
- private String mStringValue;
- private boolean mBooleanValue;
+ private String mStringResult;
+ private boolean mBooleanResult;
// These four methods are used to control the test.
- public synchronized void setStringValue(String x) {
- mStringValue = x;
+ public synchronized void setStringResult(String x) {
+ mStringResult = x;
notifyResultIsReady();
}
- public synchronized String waitForStringValue() {
+ public synchronized String waitForStringResult() {
waitForResult();
- return mStringValue;
+ return mStringResult;
}
- public synchronized void setBooleanValue(boolean x) {
- mBooleanValue = x;
+ public synchronized void setBooleanResult(boolean x) {
+ mBooleanResult = x;
notifyResultIsReady();
}
- public synchronized boolean waitForBooleanValue() {
+ public synchronized boolean waitForBooleanResult() {
waitForResult();
- return mBooleanValue;
+ return mBooleanResult;
}
public boolean getBooleanValue() {
@@ -111,14 +113,14 @@ public class JavaBridgeReturnValuesTest extends JavaBridgeTestBase {
// Note that this requires that we can pass a JavaScript string to Java.
protected String executeJavaScriptAndGetStringResult(String script) throws Throwable {
- executeJavaScript("testObject.setStringValue(" + script + ");");
- return mTestObject.waitForStringValue();
+ executeJavaScript("testObject.setStringResult(" + script + ");");
+ return mTestObject.waitForStringResult();
}
// Note that this requires that we can pass a JavaScript boolean to Java.
private boolean executeJavaScriptAndGetBooleanResult(String script) throws Throwable {
- executeJavaScript("testObject.setBooleanValue(" + script + ");");
- return mTestObject.waitForBooleanValue();
+ executeJavaScript("testObject.setBooleanResult(" + script + ");");
+ return mTestObject.waitForBooleanResult();
}
@SmallTest

Powered by Google App Engine
This is Rietveld 408576698