I use a website that typically creates a new tab with an ad on the first click. Usually, I can close the tab without even looking at it, but recently a more aggressive strain brings up a pop-up (for both Safari and Chrome on OS X) saying "Virus Found"... which I took a screenshot of:
The first few times this happened, I was using Safari, panicked, and just quit out of Safari, which worked fine. For some reason, Safari would typically not re-encounter this pop-up (or any new tab ads from the site) until I closed all the way out of Safari again.
I recently used Chrome, which got locked by the same pop-up but would not quit (that is, right-clicking the chrome icon in the dock and clicking "Quit" was non-responsive). So, I clicked the "OK" on the pop-up which brought me to an obviously scammy site wanting me to click a button to scan my computer for viruses. I did not click that button; rather, I immediately closed out of that tab. I've noticed that Chrome does not re-display that ad unless I delete its browser cache/history.
My first question is: could any harm have been done by clicking the Safari/Chrome pop-up "OK" button which redirected me to a scam site (note that I immediately closed out of the scam site)?
A related question that I am simply curious if anyone knows the answer to is why Chrome has a much harder time with this than Safari?
Some additional information: I installed AdwareMedic and scanned for Adware but it found nothing; after that, I followed instructions to look at Safari's extensions (but there are none) and to change the homepage to google (with https) which I did and the pop-up has not returned on Safari since then. I followed similar instructions to "Reset Settings" for Chrome which only brought the pop-up back (it disappears after clicking the "OK" until I remove that event's history/cache I think).
EDIT I think @aviv adequately answered my question, but in case this may sate curiosity or help future users, I'll post here the scam url (which I do not recommend visiting)
Additionally, the website that sparked this question has a url of www dot animefreak dot tv (I don't have enough reputation to post another url).
To try to get the pop-up to appear (there are other new tab "on-click" ads that appear that don't cause a dialog box to appear and go to more mundane sites), I recommend using Chrome's Incognito mode, since the site seems to have a timer or something on normal use (that is, a pop-up occurs when I click one of the hyperlinks on the site only after a while; after I close it on Safari/Chrome for my normal preferences, it does not show up again for a while but it does every time for Incognito Chrome).
If people think this update/edit would better serve the community as a new question (about how a site can open a new tab even though my preferences say not to allow such, or something along those lines), leave a comment and I will do so.
Also note that I'll may be out of contact for up to a week at a time but I will be active when able to do so.