(&self)
| 114 | } |
| 115 | |
| 116 | fn get_browser_path_map(&self) -> HashMap<BrowserPath, &str> { |
| 117 | if self.is_webview2() { |
| 118 | HashMap::from([( |
| 119 | BrowserPath::new(WINDOWS, STABLE), |
| 120 | r"Microsoft\EdgeWebView\Application", |
| 121 | )]) |
| 122 | } else { |
| 123 | HashMap::from([ |
| 124 | ( |
| 125 | BrowserPath::new(WINDOWS, STABLE), |
| 126 | r"Microsoft\Edge\Application\msedge.exe", |
| 127 | ), |
| 128 | ( |
| 129 | BrowserPath::new(WINDOWS, BETA), |
| 130 | r"Microsoft\Edge Beta\Application\msedge.exe", |
| 131 | ), |
| 132 | ( |
| 133 | BrowserPath::new(WINDOWS, DEV), |
| 134 | r"Microsoft\Edge Dev\Application\msedge.exe", |
| 135 | ), |
| 136 | ( |
| 137 | BrowserPath::new(WINDOWS, NIGHTLY), |
| 138 | r"Microsoft\Edge SxS\Application\msedge.exe", |
| 139 | ), |
| 140 | ( |
| 141 | BrowserPath::new(MACOS, STABLE), |
| 142 | "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge", |
| 143 | ), |
| 144 | ( |
| 145 | BrowserPath::new(MACOS, BETA), |
| 146 | "/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta", |
| 147 | ), |
| 148 | ( |
| 149 | BrowserPath::new(MACOS, DEV), |
| 150 | "/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev", |
| 151 | ), |
| 152 | ( |
| 153 | BrowserPath::new(MACOS, NIGHTLY), |
| 154 | "/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary", |
| 155 | ), |
| 156 | (BrowserPath::new(LINUX, STABLE), "/usr/bin/microsoft-edge"), |
| 157 | ( |
| 158 | BrowserPath::new(LINUX, BETA), |
| 159 | "/usr/bin/microsoft-edge-beta", |
| 160 | ), |
| 161 | (BrowserPath::new(LINUX, DEV), "/usr/bin/microsoft-edge-dev"), |
| 162 | ]) |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | fn discover_browser_version(&mut self) -> Result<Option<String>, Error> { |
| 167 | let (reg_key, reg_version_arg, cmd_version_arg) = if self.is_webview2() { |
no test coverage detected