summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-12 22:43:52 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-12 22:43:52 +0000
commit83ab5f200ee5c9601bfa60d1786f99c77ff1a88a (patch)
tree18ef37d863f7789d45b4a86863fd6619b9e6f293 /chrome/test
parent3e7fdb8e84bebac34195fa298330cabdf383e26e (diff)
downloadchromium_src-83ab5f200ee5c9601bfa60d1786f99c77ff1a88a.zip
chromium_src-83ab5f200ee5c9601bfa60d1786f99c77ff1a88a.tar.gz
chromium_src-83ab5f200ee5c9601bfa60d1786f99c77ff1a88a.tar.bz2
Notifications permission infobar should only be shown in response to a user gesture, not arbitrary script.
Includes UI test which verify the infobar is shown from a gesture, and not shown from raw script. BUG=27215 TEST=included Review URL: http://codereview.chromium.org/387011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31839 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rwxr-xr-xchrome/test/data/notifications/notifications_request_function.html13
-rwxr-xr-xchrome/test/data/notifications/notifications_request_inline.html10
2 files changed, 23 insertions, 0 deletions
diff --git a/chrome/test/data/notifications/notifications_request_function.html b/chrome/test/data/notifications/notifications_request_function.html
new file mode 100755
index 0000000..55b6a86
--- /dev/null
+++ b/chrome/test/data/notifications/notifications_request_function.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<script>
+function request() {
+ window.webkitNotifications.requestPermission();
+ return true;
+}
+</script>
+</head>
+<body>
+Standing by to request permission...
+</body>
+</html> \ No newline at end of file
diff --git a/chrome/test/data/notifications/notifications_request_inline.html b/chrome/test/data/notifications/notifications_request_inline.html
new file mode 100755
index 0000000..97db796
--- /dev/null
+++ b/chrome/test/data/notifications/notifications_request_inline.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+</head>
+<body>
+Requesting permission...
+</body>
+<script>
+window.webkitNotifications.requestPermission();
+</script>
+</html> \ No newline at end of file