Bug 1067060: Don't reference static things via instances in Robocop. r=mcomella

This commit is contained in:
Chris Kitching 2014-09-13 19:56:51 -07:00
parent f6574c55b5
commit 2b7e41c767
2 changed files with 4 additions and 5 deletions

View File

@ -84,9 +84,9 @@ public class testEventDispatcher extends UITest
} else if (GECKO_RESPONSE_EVENT.equals(event)) { } else if (GECKO_RESPONSE_EVENT.equals(event)) {
final String response = message.getString("response"); final String response = message.getString("response");
if ("success".equals(response)) { if ("success".equals(response)) {
EventDispatcher.getInstance().sendResponse(message, response); EventDispatcher.sendResponse(message, response);
} else if ("error".equals(response)) { } else if ("error".equals(response)) {
EventDispatcher.getInstance().sendError(message, response); EventDispatcher.sendError(message, response);
} else { } else {
fFail("Response type should be valid: " + response); fFail("Response type should be valid: " + response);
} }

View File

@ -163,13 +163,12 @@ public class testImportFromAndroid extends AboutHomeTest {
// Return bookmarks or history depending on what the user asks for // Return bookmarks or history depending on what the user asks for
ArrayList<String> urls = new ArrayList<String>(); ArrayList<String> urls = new ArrayList<String>();
ContentResolver resolver = getActivity().getContentResolver(); ContentResolver resolver = getActivity().getContentResolver();
Browser mBrowser = new Browser();
Cursor cursor = null; Cursor cursor = null;
try { try {
if (data.equals("history")) { if (data.equals("history")) {
cursor = mBrowser.getAllVisitedUrls(resolver); cursor = Browser.getAllVisitedUrls(resolver);
} else if (data.equals("bookmarks")) { } else if (data.equals("bookmarks")) {
cursor = mBrowser.getAllBookmarks(resolver); cursor = Browser.getAllBookmarks(resolver);
} }
if (cursor != null) { if (cursor != null) {
cursor.moveToFirst(); cursor.moveToFirst();