AddExtension adds an extension for the browser to load at startup. The path parameter should be a path to an extension file (which typically has a `.crx` file extension. Note that the contents of the file will be loaded into memory, as required by the protocol.
(path string)
| 130 | // `.crx` file extension. Note that the contents of the file will be loaded |
| 131 | // into memory, as required by the protocol. |
| 132 | func (c *Capabilities) AddExtension(path string) error { |
| 133 | f, err := os.Open(path) |
| 134 | if err != nil { |
| 135 | return err |
| 136 | } |
| 137 | defer f.Close() |
| 138 | return c.addExtension(f) |
| 139 | } |
| 140 | |
| 141 | // addExtension reads a Chrome extension's data from r, base64-encodes it, and |
| 142 | // attaches it to the Capabilities instance. |
nothing calls this directly
no test coverage detected