| 279 | } |
| 280 | |
| 281 | BOOL CALLBACK HtmlDialog::FindChildDialogWindow(HWND hwnd, LPARAM arg) { |
| 282 | DialogWindowInfo* window_info = reinterpret_cast<DialogWindowInfo*>(arg); |
| 283 | if (::GetWindow(hwnd, GW_OWNER) != window_info->hwndOwner) { |
| 284 | return TRUE; |
| 285 | } |
| 286 | std::vector<char> window_class_name(34); |
| 287 | if (::GetClassNameA(hwnd, &window_class_name[0], 34) == 0) { |
| 288 | // No match found. Skip |
| 289 | return TRUE; |
| 290 | } |
| 291 | if (strcmp(ALERT_WINDOW_CLASS, &window_class_name[0]) != 0 && |
| 292 | strcmp(HTML_DIALOG_WINDOW_CLASS, &window_class_name[0]) != 0) { |
| 293 | return TRUE; |
| 294 | } else { |
| 295 | // If the window style has the WS_DISABLED bit set or the |
| 296 | // WS_VISIBLE bit unset, it can't be handled via the UI, |
| 297 | // and must not be a visible dialog. |
| 298 | if ((::GetWindowLong(hwnd, GWL_STYLE) & WS_DISABLED) != 0 || |
| 299 | (::GetWindowLong(hwnd, GWL_STYLE) & WS_VISIBLE) == 0) { |
| 300 | return TRUE; |
| 301 | } |
| 302 | } |
| 303 | window_info->hwndDialog = hwnd; |
| 304 | return FALSE; |
| 305 | } |
| 306 | |
| 307 | } // namespace webdriver |
nothing calls this directly
no outgoing calls
no test coverage detected