summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorsunandt@google.com <sunandt@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 21:37:38 +0000
committersunandt@google.com <sunandt@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 21:37:38 +0000
commit055499f059c2108326071dfd314e91243cfb8bf4 (patch)
tree3bbecf675897fa45f330685d1fb37c6225f7dbc6 /chrome/test
parentd82b18ae3cf1a5976e85f773e9212431e46146cb (diff)
downloadchromium_src-055499f059c2108326071dfd314e91243cfb8bf4.zip
chromium_src-055499f059c2108326071dfd314e91243cfb8bf4.tar.gz
chromium_src-055499f059c2108326071dfd314e91243cfb8bf4.tar.bz2
Adding a html page where we open popup using window.open
Changing the pyauto popup tests to use this. BUG=70659 TEST=Popup tests should not fail on pyauto bots Review URL: http://codereview.chromium.org/6724016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/popup_blocker/popup-window-open.html14
-rw-r--r--chrome/test/functional/popups.py8
2 files changed, 18 insertions, 4 deletions
diff --git a/chrome/test/data/popup_blocker/popup-window-open.html b/chrome/test/data/popup_blocker/popup-window-open.html
new file mode 100644
index 0000000..36cabf42
--- /dev/null
+++ b/chrome/test/data/popup_blocker/popup-window-open.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<title>Popup created using window.open</title>
+<script>
+function test() {
+ window.open("data:text/html,<title>Popup Success!</title>" +
+ "you should not see this message if popup blocker is enabled",
+ "mywindow", "menubar=1, resizable=1, width=350, height=250");
+}
+</script>
+</head>
+<body onload="test()">
+</body>
+</html> \ No newline at end of file
diff --git a/chrome/test/functional/popups.py b/chrome/test/functional/popups.py
index 9c81239..7982fc9 100644
--- a/chrome/test/functional/popups.py
+++ b/chrome/test/functional/popups.py
@@ -29,7 +29,7 @@ class PopupsTest(pyauto.PyUITest):
self.assertFalse(self.GetBlockedPopupsInfo(),
msg='Should have no blocked popups on startup')
file_url = self.GetFileURLForPath(os.path.join(
- self.DataDir(), 'popup_blocker', 'popup-blocked-to-post-blank.html'))
+ self.DataDir(), 'popup_blocker', 'popup-window-open.html'))
self.NavigateToURL(file_url)
blocked_popups = self.GetBlockedPopupsInfo()
self.assertEqual(1, len(blocked_popups), msg='Popup not blocked')
@@ -39,7 +39,7 @@ class PopupsTest(pyauto.PyUITest):
def testLaunchBlockedPopup(self):
"""Verify that a blocked popup can be unblocked."""
file_url = self.GetFileURLForPath(os.path.join(
- self.DataDir(), 'popup_blocker', 'popup-blocked-to-post-blank.html'))
+ self.DataDir(), 'popup_blocker', 'popup-window-open.html'))
self.NavigateToURL(file_url)
self.assertEqual(1, len(self.GetBlockedPopupsInfo()))
self.UnblockAndLaunchBlockedPopup(0)
@@ -54,7 +54,7 @@ class PopupsTest(pyauto.PyUITest):
"""Verify popup blocking is enabled in incognito windows."""
self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
file_url = self.GetFileURLForPath(os.path.join(
- self.DataDir(), 'popup_blocker', 'popup-blocked-to-post-blank.html'))
+ self.DataDir(), 'popup_blocker', 'popup-window-open.html'))
self.NavigateToURL(file_url, 1, 0)
blocked_popups = self.GetBlockedPopupsInfo(tab_index=0, windex=1)
self.assertEqual(1, len(blocked_popups), msg='Popup not blocked')
@@ -63,7 +63,7 @@ class PopupsTest(pyauto.PyUITest):
"""Verify that a blocked popup can be unblocked in incognito."""
self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
file_url = self.GetFileURLForPath(os.path.join(
- self.DataDir(), 'popup_blocker', 'popup-blocked-to-post-blank.html'))
+ self.DataDir(), 'popup_blocker', 'popup-window-open.html'))
self.NavigateToURL(file_url, 1, 0)
self.assertEqual(1, len(self.GetBlockedPopupsInfo(tab_index=0, windex=1)))
self.UnblockAndLaunchBlockedPopup(0, tab_index=0, windex=1)