Skip to content

Commit

Permalink
Merge pull request #16 from chromium/more-web-feature-tests
Browse files Browse the repository at this point in the history
Organize web feature tests and add a few more
  • Loading branch information
carlosjoan91 committed Jan 28, 2019
2 parents 3570c75 + 9c987ed commit 534748c
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 2 deletions.
24 changes: 22 additions & 2 deletions index.html
Expand Up @@ -94,8 +94,28 @@ <h2>Web feature tests</h2>
web feature tests to observe how the individual features display the
tricky URL.
</p>
<p>
<a href="/web-feature-tests">See the web feature tests</a>

<h3>JavaScript dialogs</h3>
<ul>
<li><a href="/web-feature-tests/alert_test.html">alert</a></li>
<li><a href="/web-feature-tests/confirm_test.html">confirm</a></li>
<li><a href="/web-feature-tests/prompt_test.html">prompt</a></li>
</ul>

<h3>Permissions and permission-gated features</h3>
<ul>
<li><a href="/web-feature-tests/permissions_test.html">Permission prompt</a></li>
<li><a href="/web-feature-tests/notification.html">Notifications</a></li>
<li><a href="/web-feature-tests/webusb.html">WebUSB</a></li>
<li><a href="/web-feature-tests/webbluetooth.html">WebBluetooth</a></li>
</ul>

<h3>Authentication</h3>
<ul>
<li><a href="/web-feature-tests/http-auth/index.html">HTTP Auth</a></li>
<li><a href="/web-feature-tests/webauthn_test.html">WebAuthn</a></li>
</ul>

</body>
</html>

12 changes: 12 additions & 0 deletions web-feature-tests/confirm_test.html
@@ -0,0 +1,12 @@
<html>
<head>
<script>
confirm("Test Alert");
</script>
<title>Confirm Test</title>
</head>
<body>
<p>This page tests how a web browser displays a URL in a Javascript
confirm dialog.</p>
</body>
</html>
12 changes: 12 additions & 0 deletions web-feature-tests/prompt_test.html
@@ -0,0 +1,12 @@
<html>
<head>
<script>
prompt("Test Alert");
</script>
<title>Prompt Test</title>
</head>
<body>
<p>This page tests how a web browser displays a URL in a Javascript
prompt dialog.</p>
</body>
</html>
15 changes: 15 additions & 0 deletions web-feature-tests/webbluetooth.html
@@ -0,0 +1,15 @@
<html>
<head>
<script>
// Redirect to https because permission prompts don't fire on http.
if (window.location.protocol != "https:") {
window.location.protocol = "https";
}
</script>
<title>WebBluetooth Test</title>
</head>
<body>
<p>Click <a href="#" onclick="navigator.bluetooth.requestDevice({acceptAllDevices:true})">here</a>
to trigger a WebBluetooth chooser.</p>
</body>
</html>
15 changes: 15 additions & 0 deletions web-feature-tests/webusb.html
@@ -0,0 +1,15 @@
<html>
<head>
<script>
// Redirect to https because permission prompts don't fire on http.
if (window.location.protocol != "https:") {
window.location.protocol = "https";
}
</script>
<title>WebUSB Test</title>
</head>
<body>
<p>Click <a href="#" onclick="navigator.usb.requestDevice({filters: [{}]})">here</a>
to trigger a WebUSB chooser.</p>
</body>
</html>

0 comments on commit 534748c

Please sign in to comment.