(&self)
| 144 | } |
| 145 | |
| 146 | fn get_browser_path_map(&self) -> HashMap<BrowserPath, &str> { |
| 147 | if self.is_webview2() { |
| 148 | HashMap::from([( |
| 149 | BrowserPath::new(WINDOWS, STABLE), |
| 150 | r"Microsoft\EdgeWebView\Application", |
| 151 | )]) |
| 152 | } else { |
| 153 | HashMap::from([ |
| 154 | ( |
| 155 | BrowserPath::new(WINDOWS, STABLE), |
| 156 | r"Microsoft\Edge\Application\msedge.exe", |
| 157 | ), |
| 158 | ( |
| 159 | BrowserPath::new(WINDOWS, BETA), |
| 160 | r"Microsoft\Edge Beta\Application\msedge.exe", |
| 161 | ), |
| 162 | ( |
| 163 | BrowserPath::new(WINDOWS, DEV), |
| 164 | r"Microsoft\Edge Dev\Application\msedge.exe", |
| 165 | ), |
| 166 | ( |
| 167 | BrowserPath::new(WINDOWS, NIGHTLY), |
| 168 | r"Microsoft\Edge SxS\Application\msedge.exe", |
| 169 | ), |
| 170 | ( |
| 171 | BrowserPath::new(MACOS, STABLE), |
| 172 | "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge", |
| 173 | ), |
| 174 | ( |
| 175 | BrowserPath::new(MACOS, BETA), |
| 176 | "/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta", |
| 177 | ), |
| 178 | ( |
| 179 | BrowserPath::new(MACOS, DEV), |
| 180 | "/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev", |
| 181 | ), |
| 182 | ( |
| 183 | BrowserPath::new(MACOS, NIGHTLY), |
| 184 | "/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary", |
| 185 | ), |
| 186 | (BrowserPath::new(LINUX, STABLE), "/usr/bin/microsoft-edge"), |
| 187 | ( |
| 188 | BrowserPath::new(LINUX, BETA), |
| 189 | "/usr/bin/microsoft-edge-beta", |
| 190 | ), |
| 191 | (BrowserPath::new(LINUX, DEV), "/usr/bin/microsoft-edge-dev"), |
| 192 | ]) |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | fn discover_browser_version(&mut self) -> Result<Option<String>, Error> { |
| 197 | let (reg_key, reg_version_arg, cmd_version_arg) = if self.is_webview2() { |
no test coverage detected