[Pkg-mozext-commits] [itsalltext] 309/459: Added a mutate test
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit 016fdc9fca54eacb61a020ca53ba9621001ec807
Author: docwhat at gerf.org <docwhat at gerf.org>
Date: Thu Feb 7 17:49:56 2008 -0500
Added a mutate test
---
tests/index.html | 1 +
tests/mutate.html | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
diff --git a/tests/index.html b/tests/index.html
index 650af24..f8c65d6 100644
--- a/tests/index.html
+++ b/tests/index.html
@@ -34,6 +34,7 @@
<li><a href="style.html">Styles</a></li>
<li><a href="frames.html">Frames</a></li>
<li><a href="revisit.html">Revisit</a></li>
+ <li><a href="mutate.html">Mutate</a></li>
</ol>
<hr/>
diff --git a/tests/mutate.html b/tests/mutate.html
new file mode 100644
index 0000000..81245ca
--- /dev/null
+++ b/tests/mutate.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Mutating HTML</title>
+ <link rel="stylesheet" href="style.css" type="text/css">
+ <style type="text/css">
+ #test {
+ text-align: center;
+ }
+ </style>
+ </head>
+
+ <body>
+ <h1>Mutating HTML</h1>
+
+ <div class="back"><a href=".">back</a></div>
+
+ <p>
+ Purpose: to verify IAT! works even with dynamically created HTML.
+ </p>
+
+ <div id="test" style="height: 8em">
+ The textareas should appear here.
+ </div>
+
+ <ol>
+ <li>
+ Click here: <a href="#" onclick="iat.make()">create textarea</a>.
+ A Textarea should appear above.
+ </li>
+ <li>
+ Verify that the edit button appears when you hover over the textarea.
+ </li>
+ <li>
+ Click edit, make a change, save; the textarea should update.
+ </li>
+ </ol>
+
+ <div class="back"><a href=".">back</a></div>
+ <script type="text/javascript">
+ var iat = (function () {
+ return {
+ parent_id: 'test',
+ counter: 0,
+ make: function () {
+ var parent = document.getElementById(this.parent_id);
+ while (parent.hasChildNodes()) {
+ parent.removeChild(parent.firstChild);
+ }
+ var ta = document.createElement('textarea');
+ ta.id = 'textarea-' + this.counter;
+ ta.value = 'Textarea ' + this.counter;
+ this.counter++;
+ parent.appendChild(ta);
+ }
+ };
+ })();
+ </script>
+ </body>
+</html>
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list