Skip to content

Commit

Permalink
DanielWagnerHall: Removing unused imports and method
Browse files Browse the repository at this point in the history
r16514
  • Loading branch information
illicitonion committed Apr 10, 2012
1 parent 32b46f6 commit b971b93
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@

import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* Represents an Android HTML element.
Expand Down Expand Up @@ -414,31 +412,6 @@ public boolean isDisplayed() {
return (Boolean) driver.executeAtom(AndroidAtoms.IS_DISPLAYED.getValue(), this);
}

/**
* Converts a String of a color to hexadecimal.
*/
private String rgbToHex(final String value) {
if ("rgba(0, 0, 0, 0)".equals(value)) {
return "transparent";
}
final Pattern rgb = Pattern.compile("rgb\\((\\d{1,3}),\\s(\\d{1,3}),\\s(\\d{1,3})\\)");
final Matcher matcher = rgb.matcher(value);
if (matcher.find()) {
String hex = "#";
for (int i = 1; i <= 3; i++) {
int colour = Integer.parseInt(matcher.group(i));
String s = Integer.toHexString(colour);
if (s.length() == 1) {
s = "0" + s;
}
hex += s;
}
hex = hex.toLowerCase();
return hex;
}
return value;
}

public WebDriver getWrappedDriver() {
return driver;
}
Expand Down
1 change: 0 additions & 1 deletion java/server/src/cybervillains/ca/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.bouncycastle.x509.extension.AuthorityKeyIdentifierStructure;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.InterruptedException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import java.io.IOException;
import java.net.SocketTimeoutException;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ protected Class<? extends WebDriver> getBestMatchFor(Capabilities desired) {
return capabilitiesToDriver.get(bestMatchingCapabilities);
}

private boolean matches(String value, String value2) {
// We don't match on null
return value != null && value.equals(value2);
}

public WebDriver newInstance(Capabilities capabilities) {
Class<? extends WebDriver> clazz = getBestMatchFor(capabilities);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.openqa.selenium.remote.server.rest.ResultType;

import java.util.Map;
import java.util.logging.Logger;

public class SetLocationContext extends WebDriverHandler implements JsonParametersAware {
private volatile Location location;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.openqa.selenium.remote.server.JsonParametersAware;
import org.openqa.selenium.remote.server.Session;
import org.openqa.selenium.remote.server.handler.DeleteSession;
import org.openqa.selenium.remote.server.handler.SessionNotFoundException;
import org.openqa.selenium.remote.server.handler.WebDriverHandler;
import org.openqa.selenium.server.log.LoggingManager;
import org.openqa.selenium.server.log.PerSessionLogHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.browserlaunchers.Proxies;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.JsonToBeanConverter;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.google.common.base.Throwables;
import com.google.common.collect.Maps;
import com.google.common.io.ByteStreams;
import com.google.common.io.Closeables;

import com.thoughtworks.selenium.CommandProcessor;

Expand All @@ -31,12 +30,9 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.Iterator;
import java.util.Map;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import java.net.URL;

import org.openqa.grid.common.GridRole;
import org.openqa.grid.common.RegistrationRequest;
import org.openqa.grid.common.SeleniumProtocol;
import org.openqa.grid.e2e.utils.GridTestHelper;
import org.openqa.grid.e2e.utils.RegistryTestHelper;
import org.openqa.grid.internal.utils.SelfRegisteringRemote;
Expand All @@ -20,8 +18,6 @@
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;

public class CrashWhenStartingBrowserTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import org.jmock.Mockery;
import org.openqa.grid.common.GridRole;
import org.openqa.grid.common.SeleniumProtocol;
import org.openqa.grid.e2e.utils.GridTestHelper;
import org.openqa.grid.internal.ExternalSessionKey;
import org.openqa.grid.internal.Registry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.junit.Test;
import org.openqa.grid.internal.mock.GridHelper;
import org.openqa.grid.internal.mock.MockedRequestHandler;
import org.openqa.grid.web.servlet.handler.RequestType;

import java.util.ArrayList;
import java.util.Collections;
Expand Down
2 changes: 0 additions & 2 deletions java/server/test/org/openqa/grid/internal/PriorityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
import org.junit.Test;
import org.openqa.grid.internal.listeners.Prioritizer;
import org.openqa.grid.internal.mock.GridHelper;
import org.openqa.grid.internal.mock.MockedRequestHandler;
import org.openqa.grid.web.servlet.handler.RequestHandler;
import org.openqa.grid.web.servlet.handler.RequestType;


public class PriorityTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
import org.junit.Test;
import org.openqa.grid.internal.listeners.Prioritizer;
import org.openqa.grid.internal.mock.GridHelper;
import org.openqa.grid.internal.mock.MockedRequestHandler;
import org.openqa.grid.web.servlet.handler.RequestHandler;
import org.openqa.grid.web.servlet.handler.RequestType;


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package org.openqa.grid.internal;

import static org.openqa.grid.common.RegistrationRequest.CLEAN_UP_CYCLE;
import static org.openqa.grid.common.RegistrationRequest.ID;
import static org.openqa.grid.common.RegistrationRequest.TIME_OUT;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.openqa.grid.common.RegistrationRequest;
import org.openqa.grid.internal.listeners.TimeoutListener;
import org.openqa.grid.internal.mock.GridHelper;
import org.openqa.grid.internal.mock.MockedRequestHandler;
import org.openqa.grid.web.servlet.handler.RequestHandler;

public class SessionTimesOutTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package org.openqa.grid.internal;

import java.util.Map;

import org.junit.Assert;
import org.junit.Test;
import org.openqa.grid.common.RegistrationRequest;
import org.openqa.grid.internal.utils.CapabilityMatcher;
import org.openqa.grid.internal.utils.DefaultCapabilityMatcher;
import org.openqa.grid.internal.utils.GridHubConfiguration;
import org.openqa.grid.web.Hub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@
import org.seleniumhq.jetty7.server.handler.ContextHandler;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Enumeration;
import java.util.Set;

import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.google.common.collect.Maps;

import org.jmock.Mockery;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.SessionId;
Expand All @@ -30,7 +29,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;

public class StaticTestSessions implements DriverSessions {

Expand Down

0 comments on commit b971b93

Please sign in to comment.