summaryrefslogtreecommitdiff
path: root/tests/test_tools/selenium/core/SeleniumLog.html
diff options
context:
space:
mode:
authorwei <>2006-07-05 07:40:57 +0000
committerwei <>2006-07-05 07:40:57 +0000
commitdfa5aa5fbf11f89ce483c58016465ddc3921f082 (patch)
treef01dd1c13d700b266695e503b3ebb6e05e591410 /tests/test_tools/selenium/core/SeleniumLog.html
parentb6dfb6c447cf502e694d299dbda1b2e092c3312d (diff)
move to tests
Diffstat (limited to 'tests/test_tools/selenium/core/SeleniumLog.html')
-rw-r--r--tests/test_tools/selenium/core/SeleniumLog.html78
1 files changed, 78 insertions, 0 deletions
diff --git a/tests/test_tools/selenium/core/SeleniumLog.html b/tests/test_tools/selenium/core/SeleniumLog.html
new file mode 100644
index 00000000..dfa0080a
--- /dev/null
+++ b/tests/test_tools/selenium/core/SeleniumLog.html
@@ -0,0 +1,78 @@
+<html>
+
+<head>
+<title>Selenium Log Console</title>
+
+</head>
+<body id="logging-console">
+
+<script language="JavaScript">
+
+var logLevels = {
+ debug: 0,
+ info: 1,
+ warn: 2,
+ error: 3
+};
+
+var logLevelThreshold = null;
+
+function getThresholdLevel() {
+ var buttons = document.getElementById('logLevelChooser').level;
+ for (var i = 0; i < buttons.length; i++) {
+ if (buttons[i].checked) {
+ return buttons[i].value;
+ }
+ }
+}
+
+function setThresholdLevel(logLevel) {
+ logLevelThreshold = logLevel;
+ var buttons = document.getElementById('logLevelChooser').level;
+ for (var i = 0; i < buttons.length; i++) {
+ if (buttons[i].value==logLevel) {
+ buttons[i].checked = true;
+ }
+ else {
+ buttons[i].checked = false;
+ }
+ }
+}
+
+function append(message, logLevel) {
+ if (logLevelThreshold==null) {
+ logLevelThreshold = getThresholdLevel();
+ }
+ if (logLevels[logLevel] < logLevels[logLevelThreshold]) {
+ return;
+ }
+ var log = document.getElementById('log');
+ var newEntry = document.createElement('li');
+ newEntry.className = logLevel;
+ newEntry.appendChild(document.createTextNode(message));
+ log.appendChild(newEntry);
+ if (newEntry.scrollIntoView) {
+ newEntry.scrollIntoView();
+ }
+}
+
+</script>
+
+<div id="banner">
+ <form id="logLevelChooser">
+ <input id="level-error" type="radio" name="level"
+ value="error" /><label for="level-error">Error</label>
+ <input id="level-warn" type="radio" name="level"
+ value="warn" /><label for="level-warn">Warn</label>
+ <input id="level-info" type="radio" name="level" checked="yes"
+ value="info" /><label for="level-info">Info</label>
+ <input id="level-debug" type="radio" name="level"
+ value="debug" /><label for="level-debug">Debug</label>
+ </form>
+ <h1>Selenium Log Console</h1>
+</div>
+
+<ul id="log"></ul>
+
+</body>
+</html>