JavaScript popup testcases

This page shows an ad while this is loading, two ads when this is loaded, and an ad when this page is unloaded. All of them should be blocked.

Links part1

  1. not an ad: in "onclick", returns false should be allowed
  2. not an ad: in "onclick", returns false should be allowed
  3. not an ad: href="" should be allowed
  4. not an ad: href="" and onclick(returns true) should be allowed
  5. not an ad: href="", returns a string "foobar" should be allowed, and this page should be replaced to the string "foobar"
  6. ad: 1sec delayed ad should be blocked
  7. ad: popups an ad on mouseover should be blocked
  8. ad: open a blank popup, and load a page into the popup with 1sec delay both should be allowed (delayed loading for an ad will be blocked if this page has already opened (or tried to open) 20 ads before this link is clicked)
  9. ad: opens 30 ads with 1sec delay IF THIS PAGE IS UNBLOCKED: only 20 ads should be allowed, more ads should be blocked; IF THIS PAGE IS BLOCKED: no ad should appear
  10. with void()
  11. with void(null)

Links part2

  1. <a href="popup.html#FROM_LINK" target="newtab" onclick="void('popup.html#FROM_ONCLICK'));"> two window(tab)s should be opend
  2. <a href="popup.html#FROM_LINK" target="newtab" onclick="'popup.html#FROM_ONCLICK');"> two window(tab)s should be opend
  3. <a href="popup.html#FROM_LINK" target="newtab" onclick="'popup.html#FROM_ONCLICK'); return true;"> two window(tab)s should be opend
  4. <a href="popup.html#FROM_LINK" target="newtab" onclick="'popup.html#FROM_ONCLICK'); return false;"> only one window(tab) should be opend


This form popups an ad on submit.

  1. should be ignored (no ad should be appear)
  2. should be allowed (the form should popup an ad)