summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/old-tests/webdriver/modal/res/alerts.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/old-tests/webdriver/modal/res/alerts.html')
-rw-r--r--testing/web-platform/tests/old-tests/webdriver/modal/res/alerts.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/web-platform/tests/old-tests/webdriver/modal/res/alerts.html b/testing/web-platform/tests/old-tests/webdriver/modal/res/alerts.html
new file mode 100644
index 000000000..36c5dc139
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/webdriver/modal/res/alerts.html
@@ -0,0 +1,53 @@
+<html>
+<!-- Padding to account for small screens of mobile devices -->
+<style>
+ p {margin-top:48px;}
+</style>
+<head>
+ <title>Testing Alerts</title>
+
+ <script type="text/javascript">
+ function setInnerText(id, value) {
+ document.getElementById(id).innerHTML = '<p>' + value + '</p>';
+ }
+
+ function displayPrompt() {
+ setInnerText('text', prompt('Enter something'));
+ }
+
+ function displayPromptWithDefault() {
+ setInnerText('text', prompt('Enter something', 'This is a default value'));
+ }
+
+ function displayTwoPrompts() {
+ setInnerText('text1', prompt('First'));
+ setInnerText('text2', prompt('Second'));
+ }
+
+ function displayConfirm() {
+ setInnerText('text', confirm('cheese'));
+ }
+ </script>
+</head>
+<body>
+
+<h1>Testing Alerts and Stuff</h1>
+
+<p>This tests alerts: <a href="#" id="alert" onclick="alert('cheese');">click me</a></p>
+
+<p>This tests alerts: <a href="#" id="empty-alert" onclick="alert('');">click me</a></p>
+
+<p>Let's make the <a href="#" id="prompt" onclick="displayPrompt();">prompt happen</a></p>
+
+<p>Let's make the <a href="#" id="prompt-with-default" onclick="displayPromptWithDefault();">prompt with default happen</a></p>
+
+<p>Let's make TWO <a href="#" id="double-prompt" onclick="displayTwoPrompts();">prompts happen</a></p>
+
+<p>This tests confirm: <a href="#" id="confirm" onclick="displayConfirm();">test confirm</a></p>
+
+<div id="text"></div>
+<div id="text1"></div>
+<div id="text2"></div>
+
+</body>
+</html>