Feat: runtime profile override with getenv
[platform/framework/web/chromium-efl.git] / headless / README.md
index 1396b29..9e2f8cb 100644 (file)
@@ -9,17 +9,13 @@ There are two ways to use Headless Chromium:
 
 ## Usage via the DevTools remote debugging protocol
 
-1. Start a normal Chrome binary with the `--headless` command line flag
-(Linux-only for now):
+1. Start a normal Chrome binary with the `--headless` command line flag:
 
+```sh
+$ chrome --headless --remote-debugging-port=9222 https://chromium.org/
 ```
-$ chrome --headless --remote-debugging-port=9222 https://chromium.org
-```
-
-Currently you'll also need to use `--disable-gpu` to avoid an error from a
-missing Mesa library.
 
-2. Navigate to `http://localhost:9222` in another browser to open the
+2. Navigate to `http://localhost:9222/` in another browser to open the
 [DevTools](https://developer.chrome.com/devtools) interface or use a tool such
 as [Selenium](http://www.seleniumhq.org/) to drive the headless browser.
 
@@ -28,7 +24,7 @@ as [Selenium](http://www.seleniumhq.org/) to drive the headless browser.
 For example, the [chrome-remote-interface](https://github.com/cyrus-and/chrome-remote-interface)
 Node.js package can be used to extract a page's DOM like this:
 
-```
+```js
 const CDP = require('chrome-remote-interface');
 
 CDP((client) => {
@@ -66,7 +62,7 @@ is a small sample application which demonstrates the use of the headless C++
 API. It loads a web page and outputs the resulting DOM. To run it, first
 initialize a headless build configuration:
 
-```
+```sh
 $ mkdir -p out/Debug
 $ echo 'import("//build/args/headless.gn")' > out/Debug/args.gn
 $ gn gen out/Debug
@@ -74,14 +70,14 @@ $ gn gen out/Debug
 
 Then build the example:
 
-```
+```sh
 $ ninja -C out/Debug headless_example
 ```
 
 After the build completes, the example can be run with the following command:
 
-```
-$ out/Debug/headless_example https://www.google.com
+```sh
+$ out/Debug/headless_example https://www.google.com/
 ```
 
 [Headless Shell](https://cs.chromium.org/chromium/src/headless/app/headless_shell.cc)
@@ -90,12 +86,16 @@ debugging with the [DevTools](https://developer.chrome.com/devtools) protocol.
 To do this, start the application with an argument specifying the debugging
 port:
 
-```
+```sh
 $ ninja -C out/Debug headless_shell
-$ out/Debug/headless_shell --remote-debugging-port=9222 https://youtube.com
+$ out/Debug/headless_shell --remote-debugging-port=9222 https://youtube.com/
 ```
 
-Then navigate to `http://localhost:9222` with your browser.
+Then navigate to `http://localhost:9222/` with your browser.
+
+As of M118, precompiled `headless_shell` binaries are available for download
+under the name `chrome-headless-shell` via [Chrome for Testing
+infrastructure](https://googlechromelabs.github.io/chrome-for-testing/).
 
 ## Embedder API