diff --git a/dialog.go b/dialog.go index 2796d6f..4253f3b 100644 --- a/dialog.go +++ b/dialog.go @@ -67,16 +67,16 @@ const dialogStyle = `` const dialogMarkup = ` diff --git a/dialog_test.go b/dialog_test.go index 7bbdd8a..a8d7ec7 100644 --- a/dialog_test.go +++ b/dialog_test.go @@ -350,6 +350,13 @@ func TestConfirmYesNoAndDestructive(t *testing.T) { if plain == destructive { return fmt.Errorf("destructive button color %q matches Cancel", destructive) } + var text string + if err := chromedp.Evaluate(`getComputedStyle(document.getElementById("exapp-dialog-agree")).color`, &text).Do(ctx); err != nil { + return err + } + if text == "rgb(255, 255, 255)" || text == destructive { + return fmt.Errorf("destructive label color %q on background %q", text, destructive) + } var label string if err := chromedp.Evaluate(`document.getElementById("exapp-dialog-agree").textContent`, &label).Do(ctx); err != nil { return err