New issue
Advanced search Search tips

Issue 603975 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Popup blocker did not block popup for me when I trigger popup a second time

Project Member Reported by moplam@google.com, Apr 15 2016

Issue description

Chrome Version (from the about:version page): 50.0.2661.75 (64-bit)
Is this the most recent version: Yes
OS + version: Goobuntu as of 4/15
CPU architecture (32-bit / 64-bit): 64bit
Window manager: Cinnamon
URLs (if relevant): In development code (will explain)
Behavior in Linux Firefox: Defeated popup blocker
Behavior in Windows Chrome (if you have access to it): Not tested

What steps will reproduce the problem?


Here is the code: (cl/119970475)

PopupBlockerCheckController.prototype.validatePopUpBlocker = function() {
  // Open the smallest window possible.
  let popupWindow = goog.window.open('about:blank', {
    target: 'popupTest',
    width: 0,
    height: 0,
    top: 0,
    left: 0,
    toolbar: false,
    location: false,
    statusbar: false,
    menubar: false
  });
  if (!popupWindow || popupWindow.closed) {
    // popup blocked
    this.runningMessage_.setStyle('display', 'none');
    this.failedMessage_.setStyle('display', 'block');
    this.passedMessage_.setStyle('display', 'none');
  } else {
    // popup opened
    popupWindow.close();
    this.runningMessage_.setStyle('display', 'none');
    this.failedMessage_.setStyle('display', 'none');
    this.passedMessage_.setStyle('display', 'block');
  }
};

We have this code to test if the popup blocker is on, and inform our user that they need to turn it of for this ads review tool (because we pop up ad landing pages).

(0) Popup blocker is on
(1) When this code trigger for the first time, this works great.
(2) Then our failed message show up. 
(3) I clicked a button to trigger this code a second time.
(4) The popup blocked did not block the popup, and the test passed. (I put a break point and confirmed that the popup come up.

What is the expected result?
No matter how many times this is fired, it should continue blocking popup.


What happens instead?
I defeated the popup blocker.


screencast: https://screencast.googleplex.com/cast/5670568615477248
 

Comment 1 by ajha@chromium.org, May 5 2016

Cc: ajha@chromium.org
Components: UI>Browser>PopupBlocker
Labels: Needs-Feedback
moplam@: Could you please attach any sample jsfiddle or test file with the above test case to try for a repro and check if this has regressed or not.

Comment 2 by moplam@google.com, May 12 2016

https://jsfiddle.net/n79pe7d3/

Step to reproduce:
0) Popup blocker blocked a popup for google.com. 
1) Click "click me"
2) Popup blocker did not block popup.

Project Member

Comment 3 by sheriffbot@chromium.org, May 13 2016

Labels: -Needs-Feedback Needs-Review
Owner: ajha@chromium.org
Thank you for providing more feedback. Adding requester "ajha@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 4 by jochen@chromium.org, May 13 2016

that's how the popup blocker works - in response to a click, it's ok to open exactly one popup

Comment 5 by ajha@chromium.org, May 16 2016

Cc: jochen@chromium.org
Labels: -Needs-Review
Owner: ----
Status: WontFix (was: Unconfirmed)
Closing the issue as WAI as per C#4.


Sign in to add a comment