diff options
Diffstat (limited to 'mobile/android/geckoview/src/androidTest/assets/www')
91 files changed, 1650 insertions, 0 deletions
diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-aria-comboboxes.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-aria-comboboxes.html new file mode 100644 index 0000000000..f0a8953265 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-aria-comboboxes.html @@ -0,0 +1,11 @@ +<html> +<head> + <meta charset="utf-8"> +</head> +<body> +<div contenteditable role="combobox" aria-label="ARIA 1.0 combobox"></div> +<div role="combobox"> + <input type="text" aria-label="ARIA 1.1 combobox"> +</div> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-checkbox.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-checkbox.html new file mode 100644 index 0000000000..c2977b13af --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-checkbox.html @@ -0,0 +1,11 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <label> + <input type='checkbox' aria-describedby='desc'>many option + </label> + <div id='desc'>description</div> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-clipboard.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-clipboard.html new file mode 100644 index 0000000000..d0541fb478 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-clipboard.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <input value='hello cruel world' id='input'> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-collection.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-collection.html new file mode 100644 index 0000000000..517e1800bf --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-collection.html @@ -0,0 +1,19 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <ul> + <li>One</li> + <li>Two</li> + </ul> + <ul> + <li>1 + <ul> + <li>1.1</li> + <li>1.2</li> + </ul> + </li> + </ul> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-expandable.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-expandable.html new file mode 100644 index 0000000000..dab9f5fabe --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-expandable.html @@ -0,0 +1,8 @@ +<html> +<head> + <meta charset="utf-8"> +</head> +<body> + <button onclick="this.setAttribute('aria-expanded', this.getAttribute('aria-expanded') == 'false')" aria-expanded="false">button</button> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-headings.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-headings.html new file mode 100644 index 0000000000..280bbd89d7 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-headings.html @@ -0,0 +1,11 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <a href=\"%23\">preamble</a> + <h1>Fried cheese</h1><p>with club sauce.</p> + <a href="#"><h2>Popcorn shrimp</h2></a><button>with club sauce.</button> + <h3>Chicken fingers</h3><p>with spicy club sauce.</p> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-links.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-links.html new file mode 100644 index 0000000000..25d9b494e8 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-links.html @@ -0,0 +1,12 @@ +<html> +<head> + <meta charset="utf-8"> +</head> +<body> +<a href="/">a with href</a> +<a>a with no attributes</a> +<a name="anchor">a with name</a> +<a onclick=";">a with onclick</a> +<span role="link">span with role link</span> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-atomic.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-atomic.html new file mode 100644 index 0000000000..116f39bb93 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-atomic.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <div aria-live='polite' aria-atomic='true' id='container'>The time is <p>3pm</p></div> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-descendant.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-descendant.html new file mode 100644 index 0000000000..9d06bfb75a --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-descendant.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <div aria-live='polite'><p id='to_show'>I will be shown</p></div> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-image-labeled-by.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-image-labeled-by.html new file mode 100644 index 0000000000..9d06903535 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-image-labeled-by.html @@ -0,0 +1,12 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <img src='data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==' + aria-live='polite' + aria-labelledby='l1'> + <span id='l1'>Hello</span> + <span id='l2'>Goodbye</span> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-image.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-image.html new file mode 100644 index 0000000000..b9ffbabdfa --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region-image.html @@ -0,0 +1,11 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <div aria-live='polite' aria-atomic='true'> + This picture is + <img src='data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==' alt='happy'> + </div> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region.html new file mode 100644 index 0000000000..e964f961fb --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-live-region.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <div id="to_change"aria-live="polite"></div> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-move-caret-accessibility-focus.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-move-caret-accessibility-focus.html new file mode 100644 index 0000000000..8b27956552 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-move-caret-accessibility-focus.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <p>Hello <a href='foo'>sweet</a>, sweet <span>world</span> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-mutation.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-mutation.html new file mode 100644 index 0000000000..7e48211c0f --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-mutation.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <div><p id='to_show'>I will be shown</p></div> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-range.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-range.html new file mode 100644 index 0000000000..44056fe285 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-range.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <input type="range" aria-label="Rating" min="1" max="10" value="4"><input type="range" aria-label="Stars" min="1" max="5" step="0.5" value="4.5"><input type="range" aria-label="Percent" min="0" max="1" step="0.01" value="0.83"> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-scroll.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-scroll.html new file mode 100644 index 0000000000..f67cdaef5b --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-scroll.html @@ -0,0 +1,8 @@ +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width initial-scale=1"> +<body style="margin: 0;"> + <div style="height: 100vh;"></div> + <button>Hello</button> + <p style="margin: 0;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, + sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> +</body> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-selectable.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-selectable.html new file mode 100644 index 0000000000..a6900be862 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-selectable.html @@ -0,0 +1,12 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <ul style="list-style-type: none;" role="listbox"> + <li id="li" role="option" onclick="this.setAttribute('aria-selected', + this.getAttribute('aria-selected') == 'true' ? 'false' : 'true')">1</li> + <li role="option" aria-selected="false">2</li> + </ul> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-text-entry-node.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-text-entry-node.html new file mode 100644 index 0000000000..c8552e0571 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-text-entry-node.html @@ -0,0 +1,10 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <input aria-label='Name' aria-describedby='desc' value='Tobias'> + <div id='desc'>description</div> + <input aria-label='Last' value='Funke' required> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-tree.html b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-tree.html new file mode 100644 index 0000000000..64cc1c909e --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/accessibility/test-tree.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body> + <label for='name'>Name:</label><input id='name' type='text' value='Julie'><button>Submit</button> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/audio/owl.mp3 b/mobile/android/geckoview/src/androidTest/assets/www/audio/owl.mp3 Binary files differnew file mode 100644 index 0000000000..9fafa32f93 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/audio/owl.mp3 diff --git a/mobile/android/geckoview/src/androidTest/assets/www/autoplay.html b/mobile/android/geckoview/src/androidTest/assets/www/autoplay.html new file mode 100644 index 0000000000..24cbf474bd --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/autoplay.html @@ -0,0 +1,11 @@ +<html> + <head> + <meta charset="utf-8"> + <title>WEBM Video</title> + </head> + <body> + <video preload autoplay> + <source src="videos/gizmo.webm"></source> + </video> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/badVideoPath.html b/mobile/android/geckoview/src/androidTest/assets/www/badVideoPath.html new file mode 100644 index 0000000000..d9b34843fd --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/badVideoPath.html @@ -0,0 +1,11 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Bad Video Path</title> + </head> + <body> + <video controls preload> + <source src="videos/fileDoesNotExist.ogg"></source> + </video> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/beforeunload.html b/mobile/android/geckoview/src/androidTest/assets/www/beforeunload.html new file mode 100644 index 0000000000..6cbe6d60ed --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/beforeunload.html @@ -0,0 +1,14 @@ +<!DOCTYPE html><html> +<head> + <meta charset="utf-8"> +</head> +<body onbeforeunload="return beforeUnload()"> + <a id=navigateAway href="./hello.html">Click Me</a> + <a id=navigateAway2 href="./hello2.html">Click Me</a> + <script> + function beforeUnload() { + return "Please don't leave."; + } + </script> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/clickToReload.html b/mobile/android/geckoview/src/androidTest/assets/www/clickToReload.html new file mode 100644 index 0000000000..beddd2cdb4 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/clickToReload.html @@ -0,0 +1,10 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hello, world!</title> + <meta name="viewport" content="initial-scale=1.0"> + </head> + <body style="height: 100%" onclick="window.location.reload()"> + <p>Hello, world!</p> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/colors.html b/mobile/android/geckoview/src/androidTest/assets/www/colors.html new file mode 100644 index 0000000000..299240dc35 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/colors.html @@ -0,0 +1,14 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Colours</title> + </head> + <!-- background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. !--> + <body style="overflow:hidden; height:100%; width:100%; margin: 0px; padding: 0px; background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white);"> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/data_uri.html b/mobile/android/geckoview/src/androidTest/assets/www/data_uri.html new file mode 100644 index 0000000000..675f4b973d --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/data_uri.html @@ -0,0 +1,10 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Link with a giant data URI</title> + </head> + <body> + <a href="insert uri here" id="smallLink">Open small link</a> + <a href="insert uri here" id="largeLink">Open large link</a> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/download.html b/mobile/android/geckoview/src/androidTest/assets/www/download.html new file mode 100644 index 0000000000..45d71a410c --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/download.html @@ -0,0 +1,16 @@ +<html> + <head> + <meta charset="utf-8"> + </head> + <body> + <script> + const blob = new Blob(["Downloaded Data"], {type: "text/plain"}); + const element = document.createElement("a"); + element.href = URL.createObjectURL(blob); + element.download = "download.txt"; + element.style.display = "none"; + document.body.appendChild(element); + element.click(); + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/fixedbottom.html b/mobile/android/geckoview/src/androidTest/assets/www/fixedbottom.html new file mode 100644 index 0000000000..59bb166358 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/fixedbottom.html @@ -0,0 +1,16 @@ +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Fixed bottom element</title> + </head> + <!-- background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. !--> + <body style="overflow:hidden; height:100%; width:100%; margin: 0px; padding: 0px; background: url('/assets/www/transparent.gif'), linear-gradient(135deg, blue, blue);"> + <div id="bottom-banner" style="width:100%;position:fixed;bottom:0;left:0;background-color:lime;height:10%;"></div> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/fixedpercent.html b/mobile/android/geckoview/src/androidTest/assets/www/fixedpercent.html new file mode 100644 index 0000000000..2f63093df3 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/fixedpercent.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, minimum-scale=0.5"> +<style> +html { + width: 100%; + height: 100%; + scrollbar-width: none; +} +body { + width: 200%; + height: 2000px; + margin: 0; + padding: 0; +} + +#fixed-element { + width: 100%; + height: 200%; + position: fixed; + top: 0px; + background-color: green; +} +</style> +<div id="fixed-element"></div> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/fixedvh.html b/mobile/android/geckoview/src/androidTest/assets/www/fixedvh.html new file mode 100644 index 0000000000..516a6c4bb5 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/fixedvh.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, minimum-scale=0.5"> +<style> +html { + width: 100%; + height: 100%; + scrollbar-width: none; +} +body { + width: 200%; + height: 2000px; + margin: 0; + padding: 0; +} + +#fixed-element { + width: 100%; + height: 200vh; + position: fixed; + top: 0px; + background-color: green; +} +</style> +<div id="fixed-element"></div> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/form_blank.html b/mobile/android/geckoview/src/androidTest/assets/www/form_blank.html new file mode 100644 index 0000000000..b55a1eb31d --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/form_blank.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Forms</title> + <meta name="viewport" content="minimum-scale=1,width=device-width"> + </head> + <body> + <form id="form1" name="form1" action="form_blank.html" method="get" target="_blank"> + <input type="text" id="search" value="foo"> + <input type="submit"> + </form> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/forms.html b/mobile/android/geckoview/src/androidTest/assets/www/forms.html new file mode 100644 index 0000000000..6dbd24a6a6 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/forms.html @@ -0,0 +1,31 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Forms</title> + <meta name="viewport" content="minimum-scale=1,width=device-width"> + </head> + <body> + <form id="form1"> + <input type="text" id="user1" value="foo"> + <input type="password" id="pass1" value="foo"> + <input type="email" id="email1" value="@"> + <input type="number" id="number1" value="0"> + <input type="tel" id="tel1" value="0"> + <input type="submit" value="submit"> + </form> + <input type="Text" id="user2" value="foo"> + <input type="PassWord" id="pass2" maxlength="8" value="foo"> + <input type="button" id="button1" value="foo"/> + <input type="checkbox" id="checkbox1"/> + <input type="hidden" id="hidden1" value="foo"/> + + <iframe id="iframe"></iframe> + </body> + <script> + addEventListener("load", function(e) { + if (window.parent === window) { + document.getElementById("iframe").contentWindow.location.href = window.location.href; + } + }); + </script> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/forms2.html b/mobile/android/geckoview/src/androidTest/assets/www/forms2.html new file mode 100644 index 0000000000..309144c824 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/forms2.html @@ -0,0 +1,24 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Forms2</title> + </head> + <body> + <form> + <fieldset> + <input type="text" id="firstname"> + <input type="text" id="lastname"> + <input type="text" id="user1" value="foo"> + <input type="password" id="pass1" value="foo" autofocus> + </fieldset> + </form> + <iframe id="iframe"></iframe> + <script> + addEventListener("load", function(e) { + if (window.parent === window) { + document.getElementById("iframe").contentWindow.location.href = window.location.href; + } + }); + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/forms3.html b/mobile/android/geckoview/src/androidTest/assets/www/forms3.html new file mode 100644 index 0000000000..073e576d06 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/forms3.html @@ -0,0 +1,14 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Forms</title> + <meta name="viewport" content="minimum-scale=1,width=device-width"> + </head> + <body> + <form id="form1"> + <input type="text" id="user1" placeholder="username"> + <input type="password" id="pass1" placeholder="password"> + <input type="submit" value="submit"> + </form> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/forms4.html b/mobile/android/geckoview/src/androidTest/assets/www/forms4.html new file mode 100644 index 0000000000..ce43a268f4 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/forms4.html @@ -0,0 +1,14 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Forms</title> + <meta name="viewport" content="minimum-scale=1,width=device-width"> + </head> + <body> + <form id="form1"> + <input type="text" id="user1"> + <input type="password" id="pass1" autocomplete="new-password"> + <input type="submit" value="submit"> + </form> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/forms_autocomplete.html b/mobile/android/geckoview/src/androidTest/assets/www/forms_autocomplete.html new file mode 100644 index 0000000000..ad47079344 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/forms_autocomplete.html @@ -0,0 +1,23 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Forms</title> + <meta name="viewport" content="minimum-scale=1,width=device-width"> + </head> + <body> + <form> + <input type="text" autocomplete="email" autofocus> + <input type="text" autocomplete="username"> + <input type="password"> + <input type="submit" value="submit"> + </form> + <iframe id="iframe"></iframe> + <script> + addEventListener("load", function(e) { + if (window.parent === window) { + document.getElementById("iframe").contentWindow.location.href = window.location.href; + } + }); + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/forms_id_value.html b/mobile/android/geckoview/src/androidTest/assets/www/forms_id_value.html new file mode 100644 index 0000000000..0288b43645 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/forms_id_value.html @@ -0,0 +1,12 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Forms ID Value</title> + <meta name="viewport" content="minimum-scale=1,width=device-width"> + </head> + <body> + <form id="form1"> + <input type="password" id="value"> + </form> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/fullscreen.html b/mobile/android/geckoview/src/androidTest/assets/www/fullscreen.html new file mode 100644 index 0000000000..97b40f7f96 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/fullscreen.html @@ -0,0 +1,9 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Fullscreen</title> + </head> + <body> + <div id="fullscreen">Fullscreen Div</div> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/getusermedia_xorigin_container.html b/mobile/android/geckoview/src/androidTest/assets/www/getusermedia_xorigin_container.html new file mode 100644 index 0000000000..7e7b9457e7 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/getusermedia_xorigin_container.html @@ -0,0 +1,49 @@ +<html> + <head> + <meta charset="utf-8"> + <title>GetUserMedia from cross-origin iframe: the container document</title> + </head> + <body> + <iframe id="iframe_no_allow" src="http://127.0.0.1:4245/assets/www/getusermedia_xorigin_iframe.html"></iframe> + <iframe id="iframe" allow="camera;microphone" src="http://127.0.0.1:4245/assets/www/getusermedia_xorigin_iframe.html"></iframe> + <script> + "use strict"; + + let iframeWindow; + let generation = 1; + + async function Send(obj) { + obj.gen = generation++; + iframeWindow.postMessage(obj, "http://127.0.0.1:4245"); + while(true) { + const {data: {gen, result}} = await new Promise(r => window.onmessage = r); + if (gen == obj.gen) { + return result; + } + } + } + + function Start(constraints) { + if (iframeWindow) { + return "iframe mode already decided"; + } + iframeWindow = document.getElementById("iframe").contentWindow; + return Send({name: "start", constraints}); + } + + function StartNoAllow(constraints) { + if (iframeWindow) { + return "iframe mode already decided"; + } + iframeWindow = document.getElementById("iframe_no_allow").contentWindow; + return Send({name: "start", constraints}); + } + + async function Stop() { + const result = await Send({name: "stop"}); + iframeWindow = undefined; + return result; + } + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/getusermedia_xorigin_iframe.html b/mobile/android/geckoview/src/androidTest/assets/www/getusermedia_xorigin_iframe.html new file mode 100644 index 0000000000..8f79d03ed1 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/getusermedia_xorigin_iframe.html @@ -0,0 +1,36 @@ +<html> + <head> + <meta charset="utf-8"> + <title>GetUserMedia from cross-origin iframe: the iframe document</title> + </head> + <body> + <script> + "use strict"; + + let stream; + window.addEventListener("message", async ({data: {name, gen, constraints}}) => { + if (name == "start") { + try { + stream = await navigator.mediaDevices.getUserMedia(constraints); + Send({gen, result: "ok"}); + } catch(e) { + Send({gen, result: `${e}`}); + } + } else if (name == "stop") { + const result = !!stream; + if (stream) { + for (const t of stream.getTracks()) { + t.stop(); + } + stream = undefined; + } + Send({gen, result}); + } + }); + + function Send(obj) { + window.parent.postMessage(obj, "http://localhost:4245"); + } + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/hello.html b/mobile/android/geckoview/src/androidTest/assets/www/hello.html new file mode 100644 index 0000000000..f7a862bf17 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/hello.html @@ -0,0 +1,10 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hello, world!</title> + <link rel="manifest" href="manifest.webmanifest"> + </head> + <body> + <p>Hello, world!</p> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/hello2.html b/mobile/android/geckoview/src/androidTest/assets/www/hello2.html new file mode 100644 index 0000000000..88218a18f6 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/hello2.html @@ -0,0 +1,9 @@ +<html> +<head> +<meta charset="utf-8"> +<title>Hello, world! Again!</title> +</head> +<body> +<p>Hello, world! Again!</p> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/hungScript.html b/mobile/android/geckoview/src/androidTest/assets/www/hungScript.html new file mode 100644 index 0000000000..5b3faee9ec --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/hungScript.html @@ -0,0 +1,14 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hung Script</title> + </head> + <body><div id="content"></div></body> + <script> + var start = new Date().getTime(); + document.getElementById("content").innerHTML = "Started"; + // eslint-disable-next-line no-empty + while((new Date().getTime() - start) < 5000 ) {}; + document.getElementById("content").innerHTML = "Finished"; + </script> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/iframe_100_percent_height_no_scrollable.html b/mobile/android/geckoview/src/androidTest/assets/www/iframe_100_percent_height_no_scrollable.html new file mode 100644 index 0000000000..289d04a5e3 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/iframe_100_percent_height_no_scrollable.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, user-scalable=no"> +<style> +html { + height: 100%; + width: 100%; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} +body { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; +} +iframe { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; + border: none; + display: block; +} +</style> +<iframe frameborder=0 srcdoc="<!DOCTYPE HTML> + <html> + <style> + html, body { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; + } + </style> + <body> + <div style='width: 100%; height: 100%; background-color: green;'></div> + <script> + if (parent.document.location.search.startsWith('?event')) { + document.querySelector('div').addEventListener('touchstart', e => { + if (parent.document.location.search == '?event-prevent') { + e.preventDefault(); + } + }); + } + </script> + </body> + </html>"> +</iframe> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/iframe_100_percent_height_scrollable.html b/mobile/android/geckoview/src/androidTest/assets/www/iframe_100_percent_height_scrollable.html new file mode 100644 index 0000000000..967df79f12 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/iframe_100_percent_height_scrollable.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, user-scalable=no"> +<style> +html { + height: 100%; + width: 100%; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} +body { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; +} +iframe { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; + border: none; + display: block; +} +</style> +<iframe frameborder=0 srcdoc="<!DOCTYPE HTML> + <html> + <style> + html, body { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; + } + </style> + <body> + <div style='width: 100%; height: 500vh; background-color: green;'></div> + <script> + if (parent.document.location.search.startsWith('?event')) { + document.querySelector('div').addEventListener('touchstart', e => { + if (parent.document.location.search == '?event-prevent') { + e.preventDefault(); + } + }); + } + </script> + </body> + </html>"> +</iframe> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/iframe_98vh_no_scrollable.html b/mobile/android/geckoview/src/androidTest/assets/www/iframe_98vh_no_scrollable.html new file mode 100644 index 0000000000..5ab95fe411 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/iframe_98vh_no_scrollable.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, user-scalable=no"> +<style> +html, body { + margin: 0px; + padding: 0px; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} +iframe { + margin: 0px; + padding: 0px; + height: 98vh; + width: 100%; + border: none; + display: block; +} +</style> +<iframe frameborder=0 srcdoc="<!DOCTYPE HTML> + <html> + <style> + html, body { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; + } + </style> + <body> + <div style='width: 100%; height: 100%; background-color: green;'></div> + <script> + if (parent.document.location.search.startsWith('?event')) { + document.querySelector('div').addEventListener('touchstart', e => { + if (parent.document.location.search == '?event-prevent') { + e.preventDefault(); + } + }); + } + </script> + </body> + </html>"> +</iframe> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/iframe_98vh_scrollable.html b/mobile/android/geckoview/src/androidTest/assets/www/iframe_98vh_scrollable.html new file mode 100644 index 0000000000..ebd30addda --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/iframe_98vh_scrollable.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, user-scalable=no"> +<style> +html, body { + margin: 0px; + padding: 0px; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} +iframe { + margin: 0px; + padding: 0px; + height: 98vh; + width: 100%; + border: none; + display: block; +} +</style> +<iframe frameborder=0 srcdoc="<!DOCTYPE HTML> + <html> + <style> + html, body { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; + } + </style> + <body> + <div style='width: 100%; height: 500vh; background-color: green;'></div> + <script> + if (parent.document.location.search.startsWith('?event')) { + document.querySelector('div').addEventListener('touchstart', e => { + if (parent.document.location.search == '?event-prevent') { + e.preventDefault(); + } + }); + } + </script> + </body> + </html>"> +</iframe> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/iframe_hello.html b/mobile/android/geckoview/src/androidTest/assets/www/iframe_hello.html new file mode 100644 index 0000000000..531ddcb2b6 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/iframe_hello.html @@ -0,0 +1,10 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hello, world!</title> + </head> + <body> + <p>Hello, world! From Top Level.</p> + <iframe src="hello.html"></iframe> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/iframe_redirect_automation.html b/mobile/android/geckoview/src/androidTest/assets/www/iframe_redirect_automation.html new file mode 100644 index 0000000000..b98e7b1c1d --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/iframe_redirect_automation.html @@ -0,0 +1,10 @@ +<html> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> +<body> +Some stuff +<iframe src="http://example.org/tests/junit/simple_redirect.sjs?http://example.org"></iframe> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/iframe_redirect_local.html b/mobile/android/geckoview/src/androidTest/assets/www/iframe_redirect_local.html new file mode 100644 index 0000000000..fd9ca37cc7 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/iframe_redirect_local.html @@ -0,0 +1,10 @@ +<html> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> +<body> +Some stuff +<iframe src="http://jigsaw.w3.org/HTTP/300/301.html"></iframe> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/iframe_unknown_protocol.html b/mobile/android/geckoview/src/androidTest/assets/www/iframe_unknown_protocol.html new file mode 100644 index 0000000000..b785eda99e --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/iframe_unknown_protocol.html @@ -0,0 +1,10 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hello, world!</title> + </head> + <body> + <p>Hello, world! From Top Level.</p> + <iframe src="foo://bar"></iframe> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/images/test.gif b/mobile/android/geckoview/src/androidTest/assets/www/images/test.gif Binary files differnew file mode 100644 index 0000000000..ba3b541c31 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/images/test.gif diff --git a/mobile/android/geckoview/src/androidTest/assets/www/inputs.html b/mobile/android/geckoview/src/androidTest/assets/www/inputs.html new file mode 100644 index 0000000000..431aaf70a4 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/inputs.html @@ -0,0 +1,22 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Inputs</title> + </head> + <body> + <div id="text">lorem</div> + <input type="text" id="input" value="ipsum"> + <textarea id="textarea">dolor</textarea> + <div id="contenteditable" contenteditable="true">sit</div> + <iframe id="iframe" src="selectionAction_frame.html"></iframe> + <iframe id="designmode" src="selectionAction_frame.html"></iframe> + </body> + <script> + addEventListener("load", function() { + document.getElementById("iframe").contentDocument.body.textContent = "amet"; + var designmode = document.getElementById("designmode"); + designmode.contentDocument.body.textContent = "consectetur"; + designmode.contentDocument.designMode = "on"; + }); + </script> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/links.html b/mobile/android/geckoview/src/androidTest/assets/www/links.html new file mode 100644 index 0000000000..7fc7b17444 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/links.html @@ -0,0 +1,24 @@ +<html> +<head> +<meta charset="utf-8"> +<title>Links</title> +<style> +:link { + color: rgb(0, 0, 255); +} + +:visited { + color: rgb(255, 0, 0); +} +</style> +</head> +<body> +<ul> + <li><a id="mozilla" href="https://mozilla.org">Mozilla</a></li> + <li><a id="firefox" href="https://getfirefox.com">Get Firefox!</a></li> + <li><a id="bugzilla" href="https://bugzilla.mozilla.org">Bugzilla</a></li> + <li><a id="testpilot" href="https://testpilot.firefox.com">Test Pilot</a></li> + <li><a id="fxa" href="https://accounts.firefox.com">Firefox Accounts</a></li> +</ul> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/loremIpsum.html b/mobile/android/geckoview/src/androidTest/assets/www/loremIpsum.html new file mode 100644 index 0000000000..d4654ca34c --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/loremIpsum.html @@ -0,0 +1,16 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Lorem ipsum</title> + </head> + <body> + <p style="font-family: monospace; width: 20ch;"> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud + exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure + dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. + Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit <a href="#">anim id</a> est laborum. + </p> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/manifest.webmanifest b/mobile/android/geckoview/src/androidTest/assets/www/manifest.webmanifest new file mode 100644 index 0000000000..5528465ba2 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/manifest.webmanifest @@ -0,0 +1,17 @@ +{ + "name": "App", + "short_name": "app", + "start_url": "./start/index.html", + "display": "standalone", + "background_color": "#c0ffeeee", + "theme_color": "cadetblue", + "icons": [{ + "src": "images/test.gif", + "sizes": "192x192", + "type": "image/gif" + }], + "related_applications": [{ + "platform": "play", + "url": "https://play.google.com/store/apps/details?id=my.first.webapp" + }] +}
\ No newline at end of file diff --git a/mobile/android/geckoview/src/androidTest/assets/www/media_session_default1.html b/mobile/android/geckoview/src/androidTest/assets/www/media_session_default1.html new file mode 100644 index 0000000000..34ea6c5b62 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/media_session_default1.html @@ -0,0 +1,13 @@ +<html> + <head><title>MediaSessionDefaultTest1</title></head> + <body> + <script> + const audio1 = document.createElement("audio"); + audio1.src = "audio/owl.mp3"; + + window.onload = () => { + audio1.play(); + }; + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/media_session_dom1.html b/mobile/android/geckoview/src/androidTest/assets/www/media_session_dom1.html new file mode 100644 index 0000000000..9557088928 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/media_session_dom1.html @@ -0,0 +1,99 @@ +<html> + <head><title>MediaSessionDOMTest1</title></head> + <body> + <script> + function updatePositionState(event) { + if (event.target != active) { + return; + } + navigator.mediaSession.setPositionState({ + duration: parseFloat(event.target.duration), + position: parseFloat(event.target.currentTime), + playbackRate: 1, + }); + } + + function updateMetadata() { + navigator.mediaSession.metadata = active.metadata; + } + + function getTrack(offset) { + console.log("" + active.id + " " + offset); + const nextId = Math.min(tracks.length - 1, + Math.max(0, parseInt(active.id) + offset)); + return tracks[nextId]; + } + + navigator.mediaSession.setActionHandler("play", async () => { + updateMetadata(); + await active.play(); + }); + + navigator.mediaSession.setActionHandler("pause", () => { + active.pause(); + }); + + navigator.mediaSession.setActionHandler("previoustrack", () => { + active = getTrack(-1); + }); + + navigator.mediaSession.setActionHandler("nexttrack", () => { + active = getTrack(1); + }); + + const audio1 = document.createElement("audio"); + audio1.src = "audio/owl.mp3"; + audio1.addEventListener("timeupdate", updatePositionState); + audio1.metadata = new window.MediaMetadata({ + title: "hoot", + artist: "owl", + album: "hoots", + artwork: [{ + src: "images/test.gif", + type: "image/gif", + sizes: "265x199" + }] + }); + audio1.id = 0; + + const audio2 = document.createElement("audio"); + audio2.src = "audio/owl.mp3"; + audio2.addEventListener("timeupdate", updatePositionState); + audio2.metadata = new window.MediaMetadata({ + title: "hoot2", + artist: "stillowl", + album: "dahoots", + artwork: [{ + src: "images/test.gif", + type: "image/gif", + sizes: "265x199" + }] + }); + audio2.id = 1; + + const audio3 = document.createElement("audio"); + audio3.src = "audio/owl.mp3"; + audio3.addEventListener("timeupdate", updatePositionState); + audio3.metadata = new window.MediaMetadata({ + title: "hoot3", + artist: "immaowl", + album: "mahoots", + artwork: [{ + src: "images/test.gif", + type: "image/gif", + sizes: "265x199" + }] + }); + audio3.id = 2; + + const tracks = [audio1, audio2, audio3]; + let active = audio1; + + window.onload = async () => { + active = getTrack(0); + updateMetadata(); + await active.play(); + }; + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/mp4.html b/mobile/android/geckoview/src/androidTest/assets/www/mp4.html new file mode 100644 index 0000000000..09909fac69 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/mp4.html @@ -0,0 +1,11 @@ +<html> + <head> + <meta charset="utf-8"> + <title>MP4 Video</title> + </head> + <body> + <video controls preload> + <source src="videos/short.mp4"></source> + </video> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/newSession.html b/mobile/android/geckoview/src/androidTest/assets/www/newSession.html new file mode 100644 index 0000000000..51a761ca6b --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/newSession.html @@ -0,0 +1,10 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hello, world!</title> + </head> + <body> + <a id="targetBlankLink" target="_blank" rel="opener" href="newSession_child.html">target="_blank"</a> + <a id="noOpenerLink" target="_blank" rel="noopener" href="http://example.com">rel="noopener"</a> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/newSession_child.html b/mobile/android/geckoview/src/androidTest/assets/www/newSession_child.html new file mode 100644 index 0000000000..c01539fcdf --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/newSession_child.html @@ -0,0 +1,9 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hello, world!</title> + </head> + <body> + <p>I'm the child</p> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/ogg.html b/mobile/android/geckoview/src/androidTest/assets/www/ogg.html new file mode 100644 index 0000000000..dd478d3b3f --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/ogg.html @@ -0,0 +1,11 @@ +<html> + <head> + <meta charset="utf-8"> + <title>OGG Video</title> + </head> + <body> + <video controls preload> + <source src="videos/video.ogg"></source> + </video> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/popup.html b/mobile/android/geckoview/src/androidTest/assets/www/popup.html new file mode 100644 index 0000000000..03a8515159 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/popup.html @@ -0,0 +1,12 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hello, world!</title> + </head> + <body> + <p>Launching popup...</p> + <script> + window.open("hello.html"); + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/prompts.html b/mobile/android/geckoview/src/androidTest/assets/www/prompts.html new file mode 100644 index 0000000000..d95a2c51e3 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/prompts.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + </head> + <body> + <select id="selectexample"> + <option>1</option> + <option>2</option> + </select> + + <input type="date" id="dateexample" /> + + <input type="month" id="monthexample" /> + + <input type="week" id="weekexample" /> + + <input type="time" id="timeexample" /> + + <input type="datetime-local" id="datetimelocalexample" /> + + <input type="color" id="colorexample" value="#ffffff" /> + + <input type="file" id="fileexample" accept="image/*,.pdf" capture="user" /> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/push/push.html b/mobile/android/geckoview/src/androidTest/assets/www/push/push.html new file mode 100644 index 0000000000..05727e2523 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/push/push.html @@ -0,0 +1,10 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Push API test</title> + </head> + <body> + <p>Hello, world!</p> + <script src="push.js"></script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/push/push.js b/mobile/android/geckoview/src/androidTest/assets/www/push/push.js new file mode 100644 index 0000000000..f6eac1696e --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/push/push.js @@ -0,0 +1,44 @@ +window.doSubscribe = async function(applicationServerKey) { + const registration = await navigator.serviceWorker.register("./sw.js"); + const sub = await registration.pushManager.subscribe({ + applicationServerKey, + }); + return sub.toJSON(); +}; + +window.doGetSubscription = async function() { + const registration = await navigator.serviceWorker.register("./sw.js"); + const sub = await registration.pushManager.getSubscription(); + if (sub) { + return sub.toJSON(); + } + + return null; +}; + +window.doUnsubscribe = async function() { + const registration = await navigator.serviceWorker.register("./sw.js"); + const sub = await registration.pushManager.getSubscription(); + sub.unsubscribe(); + return {}; +}; + +window.doWaitForPushEvent = function() { + return new Promise(resolve => { + navigator.serviceWorker.addEventListener("message", function(e) { + if (e.data.type === "push") { + resolve(e.data.payload); + } + }); + }); +}; + +window.doWaitForSubscriptionChange = function() { + return new Promise(resolve => { + navigator.serviceWorker.addEventListener("message", function(e) { + if (e.data.type === "pushsubscriptionchange") { + resolve(e.data.type); + } + }); + }); +}; diff --git a/mobile/android/geckoview/src/androidTest/assets/www/push/sw.js b/mobile/android/geckoview/src/androidTest/assets/www/push/sw.js new file mode 100644 index 0000000000..1ebbf50053 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/push/sw.js @@ -0,0 +1,26 @@ +self.addEventListener("install", function() { + self.skipWaiting(); +}); + +self.addEventListener("activate", function(e) { + e.waitUntil(self.clients.claim()); +}); + +self.addEventListener("push", async function(e) { + const clients = await self.clients.matchAll(); + clients.forEach(function(client) { + client.postMessage({ type: "push", payload: e.data.text() }); + }); + + try { + const { title, body } = e.data.json(); + self.registration.showNotification(title, { body }); + } catch (e) {} +}); + +self.addEventListener("pushsubscriptionchange", async function(e) { + const clients = await self.clients.matchAll(); + clients.forEach(function(client) { + client.postMessage({ type: "pushsubscriptionchange" }); + }); +}); diff --git a/mobile/android/geckoview/src/androidTest/assets/www/reflect_local_storage_into_title.html b/mobile/android/geckoview/src/androidTest/assets/www/reflect_local_storage_into_title.html new file mode 100644 index 0000000000..b8eafee9aa --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/reflect_local_storage_into_title.html @@ -0,0 +1,17 @@ +<html> + <head> + <meta charset="utf-8"> + <title>no title</title> + <script> + // If we have a query string, save it to the local storage. + if (window.location.search.length > 0) { + const value = window.location.search.substr(1); + localStorage.setItem("ctx", value); + } + + // Set the title to reflect the local storage value. + document.title = "storage=" + localStorage.getItem("ctx"); + </script> + </head> + <body></body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/resubmit.html b/mobile/android/geckoview/src/androidTest/assets/www/resubmit.html new file mode 100644 index 0000000000..d6e05a77de --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/resubmit.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> +</head> +<body> + <form action="hello.html" method="post"> + <input id=text> + <button id=submit>Submit</button> + </form> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/root_100_percent_height.html b/mobile/android/geckoview/src/androidTest/assets/www/root_100_percent_height.html new file mode 100644 index 0000000000..1f778fcae4 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/root_100_percent_height.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, user-scalable=no"> +<style> +html { + height: 100%; + width: 100%; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} +body { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; +} +</style> +<body> +<div style="width: 100%; height: 100%; background-color: green;"></div> +<script> + if (document.location.search.startsWith('?event')) { + document.querySelector('div').addEventListener('touchstart', e => { + if (document.location.search == '?event-prevent') { + e.preventDefault(); + } + }); + } +</script> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/root_100vh.html b/mobile/android/geckoview/src/androidTest/assets/www/root_100vh.html new file mode 100644 index 0000000000..ca0666fcbc --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/root_100vh.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, user-scalable=no"> +<style> +html { + height: 100%; + width: 100%; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} +body { + width: 100%; + margin: 0px; + padding: 0px; +} +</style> +<body> +<div style="width: 100%; height: 100vh; background-color: green;"></div> +<script> + if (document.location.search.startsWith('?event')) { + document.querySelector('div').addEventListener('touchstart', e => { + if (document.location.search == '?event-prevent') { + e.preventDefault(); + } + }); + } +</script> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/root_98vh.html b/mobile/android/geckoview/src/androidTest/assets/www/root_98vh.html new file mode 100644 index 0000000000..ced7f4298a --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/root_98vh.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, user-scalable=no"> +<style> +html { + height: 100%; + width: 100%; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} +body { + width: 100%; + margin: 0px; + padding: 0px; +} +</style> +<body> +<div style="width: 100%; height: 98vh; background-color: green;"></div> +<script> + if (document.location.search.startsWith('?event')) { + document.querySelector('div').addEventListener('touchstart', e => { + if (document.location.search == '?event-prevent') { + e.preventDefault(); + } + }); + } +</script> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/saveState.html b/mobile/android/geckoview/src/androidTest/assets/www/saveState.html new file mode 100644 index 0000000000..f576c29664 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/saveState.html @@ -0,0 +1,18 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Hello, world!</title> + <meta name="viewport" content="width=device-width,initial-scale=1"> + <style> + p { + height: 300vh; + } + </style> + </head> + <body> + <form id="form"> + <input type="text" id="name"> + </form> + <p>Hello, world!</p> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/scroll.html b/mobile/android/geckoview/src/androidTest/assets/www/scroll.html new file mode 100644 index 0000000000..9c92eae839 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/scroll.html @@ -0,0 +1,46 @@ +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=0.5"> + <style type="text/css"> +body { + margin: 0; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} + +#one { + background-color: red; + width: 200vw; + height: 50vh; +} + +#two { + background-color: green; + width: 200vw; + height: 50vh; +} + +#three { + background-color: blue; + width: 200vw; + height: 200vh; +} + </style> + </head> + <body> + <div id="one"></div> + <div id="two"></div> + <div id="three"></div> + <script> + document.getElementById('two').addEventListener('touchstart', e => { + console.log('not preventing default'); + }); + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/selectionAction_frame.html b/mobile/android/geckoview/src/androidTest/assets/www/selectionAction_frame.html new file mode 100644 index 0000000000..99197658b7 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/selectionAction_frame.html @@ -0,0 +1,6 @@ +<html> + <head> + <meta charset="utf-8"> + </head> + <body></body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/simple_redirect.sjs b/mobile/android/geckoview/src/androidTest/assets/www/simple_redirect.sjs new file mode 100644 index 0000000000..b6249cadff --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/simple_redirect.sjs @@ -0,0 +1,5 @@ +function handleRequest(request, response) +{ + response.setStatusLine(request.httpVersion, 301, "Moved Permanently"); + response.setHeader("Location", request.queryString, false); +} diff --git a/mobile/android/geckoview/src/androidTest/assets/www/titleChange.html b/mobile/android/geckoview/src/androidTest/assets/www/titleChange.html new file mode 100644 index 0000000000..3e89774bf2 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/titleChange.html @@ -0,0 +1,16 @@ +<html> +<head> + <meta charset="utf-8"> +</head> +<header><title>Title1</title></header> + <body> + <script> + addEventListener("load", function() { + setTimeout(function() { + document.title = "Title2"; + }, 100); + }); + </script> + </body> + <iframe src="hello.html"></iframe> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/touch.html b/mobile/android/geckoview/src/androidTest/assets/www/touch.html new file mode 100644 index 0000000000..431a280fd9 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/touch.html @@ -0,0 +1,54 @@ +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="height=device-height,width=device-width,initial-scale=1.0"> + <style type="text/css"> +body { + width: 100%; + height: 100%; + margin: 0; + padding: 0px; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} + +#one { + background-color: red; + width: 100%; + height: 33% +} + +#two { + background-color: green; + width: 100%; + height: 33% +} + +#three { + background-color: blue; + width: 100%; + height: 33% +} + </style> + </head> + <body> + <div id="one"></div> + <div id="two"></div> + <div id="three"></div> + <script> + document.getElementById('two').addEventListener('touchstart', e => { + console.log('preventing default'); + e.preventDefault(); + }); + + document.getElementById('three').addEventListener('touchstart', e => { + console.log('not preventing default'); + }); + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/touchstart.html b/mobile/android/geckoview/src/androidTest/assets/www/touchstart.html new file mode 100644 index 0000000000..dae3e933e7 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/touchstart.html @@ -0,0 +1,37 @@ +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=0.5"> + <style type="text/css"> +body { + margin: 0; + /* background contains one extra transparent.gif because we want trick the + contentful paint detection; We want to make sure the background is loaded + before the test starts so we always wait for the contentful paint timestamp + to exist, however, gradient isn't considered as contentful per spec, so Gecko + wouldn't generate a timestamp for it. Hence, we added a transparent gif + to the image list to trick the detection. */ + background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white); +} + +#one { + background-color: red; + width: 200%; + height: 100vh; +} +#two { + background-color: blue; + width: 200%; + height: 800vh; +} + </style> + </head> + <body> + <div id="one"></div> + <div id="two"></div> + <script> + document.getElementById("two").addEventListener("touchstart", e => { + }); + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/trackers.html b/mobile/android/geckoview/src/androidTest/assets/www/trackers.html new file mode 100644 index 0000000000..8d92c70721 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/trackers.html @@ -0,0 +1,14 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Trackers</title> + </head> + <body> + <p>Trackers</p> + + <!-- test-track-simple --> + <script src="http://trackertest.org/tracker.js"></script> + <script src="https://tracking.example.com/tracker.js"></script> + <script src="https://itisatracker.org/tracker.js"></script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/transparent.gif b/mobile/android/geckoview/src/androidTest/assets/www/transparent.gif Binary files differnew file mode 100644 index 0000000000..e565824aaf --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/transparent.gif diff --git a/mobile/android/geckoview/src/androidTest/assets/www/update_manifest.json b/mobile/android/geckoview/src/androidTest/assets/www/update_manifest.json new file mode 100644 index 0000000000..7b2de1f278 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/update_manifest.json @@ -0,0 +1,40 @@ +{ + "addons": { + "update@example.com": { + "updates": [ + { + "version": "1.0", + "update_link": "https://example.org/tests/junit/update-1.xpi" + }, + { + "version": "2.0", + "update_link": "https://example.org/tests/junit/update-2.xpi" + } + ] + }, + "update-postpone@example.com": { + "updates": [ + { + "version": "1.0", + "update_link": "https://example.org/tests/junit/update-postpone-1.xpi" + }, + { + "version": "2.0", + "update_link": "https://example.org/tests/junit/update-postpone-2.xpi" + } + ] + }, + "update-with-perms@example.com": { + "updates": [ + { + "version": "1.0", + "update_link": "https://example.org/tests/junit/update-with-perms-1.xpi" + }, + { + "version": "2.0", + "update_link": "https://example.org/tests/junit/update-with-perms-2.xpi" + } + ] + } + } +} diff --git a/mobile/android/geckoview/src/androidTest/assets/www/videos/gizmo.webm b/mobile/android/geckoview/src/androidTest/assets/www/videos/gizmo.webm Binary files differnew file mode 100644 index 0000000000..518531a93f --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/videos/gizmo.webm diff --git a/mobile/android/geckoview/src/androidTest/assets/www/videos/short.mp4 b/mobile/android/geckoview/src/androidTest/assets/www/videos/short.mp4 Binary files differnew file mode 100644 index 0000000000..a674b7eb68 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/videos/short.mp4 diff --git a/mobile/android/geckoview/src/androidTest/assets/www/videos/video.ogg b/mobile/android/geckoview/src/androidTest/assets/www/videos/video.ogg Binary files differnew file mode 100644 index 0000000000..ac7ece3519 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/videos/video.ogg diff --git a/mobile/android/geckoview/src/androidTest/assets/www/viewport.html b/mobile/android/geckoview/src/androidTest/assets/www/viewport.html new file mode 100644 index 0000000000..9594246ed9 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/viewport.html @@ -0,0 +1,16 @@ +<html> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"> +<style type="text/css"> +#wide { + background-color: rgb(200, 0, 0); + width: 100%; + height: 40px; +} +</style> +</head> +<body> +<div id="wide"></div> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/webm.html b/mobile/android/geckoview/src/androidTest/assets/www/webm.html new file mode 100644 index 0000000000..f329582575 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/webm.html @@ -0,0 +1,11 @@ +<html> + <head> + <meta charset="utf-8"> + <title>WebM Video</title> + </head> + <body> + <video controls preload> + <source src="videos/gizmo.webm"></source> + </video> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window.html b/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window.html new file mode 100644 index 0000000000..03b4c86200 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window.html @@ -0,0 +1,11 @@ +<html> + <head> + <meta charset="utf-8"> + <title>Open Window test</title> + </head> + <body> + <p>Hello, world!</p> + <script type="text/javascript" src="./open_window.js"> + </script> + </body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window.js b/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window.js new file mode 100644 index 0000000000..05bd68c797 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window.js @@ -0,0 +1,15 @@ +navigator.serviceWorker.register("./service-worker.js", { + scope: ".", +}); + +function showNotification() { + Notification.requestPermission(function(result) { + if (result === "granted") { + navigator.serviceWorker.ready.then(function(registration) { + registration.showNotification("Open Window Notification", { + body: "Hello", + }); + }); + } + }); +} diff --git a/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window_target.html b/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window_target.html new file mode 100644 index 0000000000..83cfc49234 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/worker/open_window_target.html @@ -0,0 +1,9 @@ +<html> +<head> + <meta charset="utf-8"> + <title>Open Window test target</title> +</head> +<body> +<p>Hello, world!</p> +</body> +</html> diff --git a/mobile/android/geckoview/src/androidTest/assets/www/worker/service-worker.js b/mobile/android/geckoview/src/androidTest/assets/www/worker/service-worker.js new file mode 100644 index 0000000000..aa0d292193 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/worker/service-worker.js @@ -0,0 +1,15 @@ +self.addEventListener("install", function() { + console.log("install"); + self.skipWaiting(); +}); + +self.addEventListener("activate", function(e) { + console.log("activate"); + e.waitUntil(self.clients.claim()); +}); + +self.onnotificationclick = function(event) { + console.log("onnotificationclick"); + self.clients.openWindow("open_window_target.html"); + event.notification.close(); +}; |