Index: chrome/test/data/banners/appinstalled_test_page.html |
diff --git a/chrome/test/data/banners/appinstalled_test_page.html b/chrome/test/data/banners/appinstalled_test_page.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..98da3dc4639df28813d686dd91c94fc363369703 |
--- /dev/null |
+++ b/chrome/test/data/banners/appinstalled_test_page.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
dominickn
2016/10/12 22:35:09
Possibly dumb question: could you put the JS in he
Matt Giuca
2016/12/09 04:36:48
Test pages used in this test: the other pages for
|
+<html> |
+ <head> |
+ <title>appinstalled event test page</title> |
+ <script> |
+ var eventCounter = 0; |
+ |
+ function onAppInstalled() { |
+ eventCounter++; |
+ window.document.title = 'Got appinstalled ' + eventCounter |
+ + ' times'; |
+ } |
+ |
+ window.addEventListener('load', () => { |
+ // Test both the addEventListener and onX attribute versions. |
+ // When an app is installed, this should fire twice. |
+ window.addEventListener('appinstalled', onAppInstalled); |
+ window.onappinstalled = onAppInstalled; |
+ }); |
+ </script> |
+ </head> |
+ <body> |
+ </body> |
+</html> |