parameters: (self, uri)
docstring: Return the base layout test name for a given URI.
  
          This returns the test name for a given URI, e.g., if you passed in
          "file:///src/LayoutTests/fast/html/keygen.html" it would return
          "fast/html/keygen.html".
docstring_summary: Return the base layout test name for a given URI.
docstring_tokens: Return the base layout test name for a given URI .
function: def uri_to_test(self, uri):
          """Return the base layout test name for a given URI.
  
          This returns the test name for a given URI, e.g., if you passed in
          "file:///src/LayoutTests/fast/html/keygen.html" it would return
          "fast/html/keygen.html".
  
          """
          if uri.startswith("file:///"):
              prefix = path.abspath_to_uri(self._port.host.platform, self._port.layout_tests_dir())
              if not prefix.endswith('/'):
                  prefix += '/'
              return uri[len(prefix):]
          if uri.startswith(self.web_platform_test_server_base_url):
              return uri.replace(self.web_platform_test_server_base_url, self.web_platform_test_server_doc_root)
          if uri.startswith("http://"):
              return uri.replace('http://127.0.0.1:8000/', self.HTTP_DIR)
          if uri.startswith("https://"):
              return uri.replace('https://127.0.0.1:8443/', self.HTTP_DIR)
          raise NotImplementedError('unknown url type: %s' % uri)
function_tokens: def uri_to_test ( self , uri ) : if uri . startswith ( "file:///" ) : prefix = path . abspath_to_uri ( self . _port . host . platform , self . _port . layout_tests_dir ( ) ) if not prefix . endswith ( '/' ) : prefix += '/' return uri [ len ( prefix ) : ] if uri . startswith ( self . web_platform_test_server_base_url ) : return uri . replace ( self . web_platform_test_server_base_url , self . web_platform_test_server_doc_root ) if uri . startswith ( "http://" ) : return uri . replace ( 'http://127.0.0.1:8000/' , self . HTTP_DIR ) if uri . startswith ( "https://" ) : return uri . replace ( 'https://127.0.0.1:8443/' , self . HTTP_DIR ) raise NotImplementedError ( 'unknown url type: %s' % uri )