bug 1490660: webdriver: correct README; r=jgraham
authorAndreas Tolfsen <ato@sny.no>
Wed, 12 Sep 2018 14:21:44 +0100
changeset 436031 a129c1be29f1c78ba52d4c9689df52c5010350c1
parent 436030 3fa9372e4c5f05713fe1a9f758487fa443ce7500
child 436032 e8ef34cb3e9d1b8737e2ab5d4033d35ae68d6d9d
push id34625
push userdvarga@mozilla.com
push dateThu, 13 Sep 2018 02:31:40 +0000
treeherdermozilla-central@51e9e9660b3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1490660
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1490660: webdriver: correct README; r=jgraham The usage example is out of date, and the URLs for the mailing list archive and the WebDriver specification were wrong.
testing/webdriver/README.md
--- a/testing/webdriver/README.md
+++ b/testing/webdriver/README.md
@@ -12,90 +12,36 @@ The webdriver library provides the forma
 bounds checks, and JSON marshaling conventions for correctly parsing
 and emitting the WebDriver protocol.  It also provides an HTTP server
 where endpoints are mapped to the different WebDriver commands.
 
 **As of right now, this is an implementation for the server side of the
 WebDriver API in Rust, not the client side.**
 
 [webdriver crate]: https://crates.io/crates/webdriver
-[W3C WebDriver standard]: https://w3c.github.io/webdriver/webdriver-spec.html
+[W3C WebDriver standard]: https://w3c.github.io/webdriver/
 
 
 Building
 ========
 
 The library is built using the usual [Rust conventions]:
 
-    % cargo build
+	% cargo build
 
 To run the tests:
 
-    % cargo test
+	% cargo test
 
 [Rust conventions]: http://doc.crates.io/guide.html
 
 
-Usage
-=====
-
-To start an HTTP server that handles incoming command requests, a request
-handler needs to be implemented.  It takes an incoming `WebDriverMessage`
-and emits a `WebDriverResponse`:
-
-	impl WebDriverHandler for MyHandler {
-	    fn handle_command(
-	        &mut self,
-	        _: &Option<Session>,
-	        msg: WebDriverMessage,
-	    ) -> WebDriverResult<WebDriverResponse> {
-	        …
-	    }
-
-	    fn delete_session(&mut self, _: &Option<Session>) {
-	        …
-	    }
-	}
-
-	let addr = SocketAddr::new("localhost", 4444);
-	let handler = MyHandler {};
-	let server = webdriver::server::start(addr, handler, vec![])?;
-	info!("Listening on {}", server.socket);
-
-It is also possible to provide so called [extension commands] by providing
-a vector of known extension routes, for which each new route needs to
-implement the `WebDriverExtensionRoute` trait.  Each route needs to map
-to a `WebDriverExtensionCommand`:
-
-	pub enum MyExtensionRoute { HelloWorld }
-	pub enum MyExtensionCommand { HelloWorld }
-
-	impl WebDriverExtensionRoute for MyExtensionRoute {
-	    fn command(
-	        &self,
-	        captures: &Captures,
-	        body: &Json,
-	    ) -> WebDriverResult<WebDriverCommand<MyExtensionCommand>> {
-	        …
-	    }
-	}
-
-	let extension_routes = vec![
-	    (Method::Get, "/session/{sessionId}/moz/hello", MyExtensions::HelloWorld)
-	];
-
-	…
-
-	let server = webdriver::server::start(addr, handler, extension_routes[..])?;
-
-[extension commands]: https://w3c.github.io/webdriver/webdriver-spec.html#dfn-extension-commands
-
 Contact
 =======
 
 The mailing list for webdriver discussion is
 tools-marionette@lists.mozilla.org ([subscribe], [archive]).
 
-There is also an IRC channel to talk about using and developing webdriver
-in #ateam on irc.mozilla.org.
+There is also an IRC channel to talk about using and developing
+webdriver in #ateam on irc.mozilla.org.
 
 [subscribe]: https://lists.mozilla.org/listinfo/tools-marionette
-[archive]: http://groups.google.com/group/mozilla.tools.marionette
+[archive]: https://lists.mozilla.org/pipermail/tools-marionette/