diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-11 20:13:44 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-11 20:13:44 +0000 |
commit | c274acc67753226943c28e01f24307610bb8c5c0 (patch) | |
tree | 96a8342ddb53a3162f0748ebe90dc167bde86230 /chrome/test/data/constrained_files | |
parent | 00b64f3980da6ce2c42007c14952f613c4adc640 (diff) | |
download | chromium_src-c274acc67753226943c28e01f24307610bb8c5c0.zip chromium_src-c274acc67753226943c28e01f24307610bb8c5c0.tar.gz chromium_src-c274acc67753226943c28e01f24307610bb8c5c0.tar.bz2 |
Only block alert() requests from blocked popups; not all popups.
Add two unit tests to make sure we do the right thing; required
adding a bunch of stuff to the automation layer.
Review URL: http://codereview.chromium.org/10282
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5198 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/constrained_files')
-rw-r--r-- | chrome/test/data/constrained_files/block_alert.html | 17 | ||||
-rw-r--r-- | chrome/test/data/constrained_files/show_alert.html | 15 | ||||
-rw-r--r-- | chrome/test/data/constrained_files/show_alert_2.html | 8 |
3 files changed, 40 insertions, 0 deletions
diff --git a/chrome/test/data/constrained_files/block_alert.html b/chrome/test/data/constrained_files/block_alert.html new file mode 100644 index 0000000..063d972 --- /dev/null +++ b/chrome/test/data/constrained_files/block_alert.html @@ -0,0 +1,17 @@ +<html>
+ <head>
+ <title>Block alert from blocked popup?</title>
+ <script>
+ if (location.search.indexOf("popup") != -1) {
+ document.write("This should still be inside the tab, but it is now " +
+ "in a new window!");
+ alert("The popup has been \"popped out\" of the tab");
+ } else {
+ window.open("?popup");
+ }
+ </script>
+ </head>
+<body>
+<h1>Block alert from blocked popup?</h1>
+</body>
+</html>
diff --git a/chrome/test/data/constrained_files/show_alert.html b/chrome/test/data/constrained_files/show_alert.html new file mode 100644 index 0000000..742271e --- /dev/null +++ b/chrome/test/data/constrained_files/show_alert.html @@ -0,0 +1,15 @@ +<html>
+ <head>
+ <title>Must show alert to pass!</title>
+ <script type="text/javascript" language="JavaScript">
+ function openTestWin(){
+ wintest = window.open("show_alert_2.html","wintest",
+ "width=864,height=600");
+ wintest.focus();
+ }
+ </script>
+ </head>
+<body onClick="openTestWin();">
+<h1>Must show alert to pass!</h1>
+</body>
+</html>
diff --git a/chrome/test/data/constrained_files/show_alert_2.html b/chrome/test/data/constrained_files/show_alert_2.html new file mode 100644 index 0000000..3fbc795 --- /dev/null +++ b/chrome/test/data/constrained_files/show_alert_2.html @@ -0,0 +1,8 @@ +<html>
+ <head>
+ <title>Must show alert to pass!</title>
+ </head>
+ <body onClick="alert('Alert running');">
+ <h1>Must show alert to pass!</h1>
+ </body>
+</html>
|