[autotest] Adds chromecast deps, server, client test for sonic.

Adds an autotest dependency that installs the freshest
version of the chromecast extension as an autotest dep.

Also adds a server and client test for sonic that installs the
extension and performs a tab cast, and starts the youtube/netflix apps.
The tests will only work when the DUT and the sonic device are on
the same subnet.

TEST=emerge-lumpy autotest-deps, ran a test that uses it.
     Ran the tests, visually verified results.
BUG=chromium:321177, chromium:321179, chromium:292640

Change-Id: I48a6149a11d3bb8167a1c766873e672b3523d769
Reviewed-on: https://chromium-review.googlesource.com/179407
Commit-Queue: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
diff --git a/client/common_lib/cros/chromedriver.py b/client/common_lib/cros/chromedriver.py
index a118433..65bd0a0 100644
--- a/client/common_lib/cros/chromedriver.py
+++ b/client/common_lib/cros/chromedriver.py
@@ -41,8 +41,10 @@
         assert os.geteuid() == 0, 'Need superuser privileges'
 
         # Log in with telemetry
-        self._browser = chrome.Chrome(extension_paths=extension_paths,
-                                      is_component=is_component).browser
+        self._chrome = chrome.Chrome(extension_paths=extension_paths,
+                                     is_component=is_component,
+                                     extra_browser_args=extra_chrome_flags)
+        self._browser = self._chrome.browser
 
         # Start ChromeDriver server
         self._server = chromedriver_server(CHROMEDRIVER_EXE_PATH)
@@ -81,6 +83,16 @@
             del self._browser
 
 
+    def get_extension(self, extension_path):
+        """Gets an extension by proxying to the browser.
+
+        @param extension_path: Path to the extension loaded in the browser.
+
+        @return: A telemetry extension object representing the extension.
+        """
+        return self._chrome.get_extension(extension_path)
+
+
 class chromedriver_server(object):
     """A running ChromeDriver server.