diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:30:52 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:30:52 -0800 |
commit | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (patch) | |
tree | 11425ea0b299d6fb89c6d3618a22d97d5bf68d0f /WebCore/manual-tests/inspector/error-warning-count.html | |
parent | 648161bb0edfc3d43db63caed5cc5213bc6cb78f (diff) | |
download | external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.zip external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.tar.gz external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'WebCore/manual-tests/inspector/error-warning-count.html')
-rw-r--r-- | WebCore/manual-tests/inspector/error-warning-count.html | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/WebCore/manual-tests/inspector/error-warning-count.html b/WebCore/manual-tests/inspector/error-warning-count.html new file mode 100644 index 0000000..9f6b9c2 --- /dev/null +++ b/WebCore/manual-tests/inspector/error-warning-count.html @@ -0,0 +1,60 @@ +<script> + function clickHandler(errors, warnings) + { + return function() + { + for (var i = 0; i < errors; ++i) + console.error("Error " + (i + 1)); + for (var i = 0; i < warnings; ++i) + console.warn("Warning " + (i + 1)); + } + } + + function loaded() + { + var tests = [ + { errors: 0, warnings: 0 }, + { errors: 1, warnings: 0 }, + { errors: 2, warnings: 0 }, + { errors: 0, warnings: 1 }, + { errors: 0, warnings: 2 }, + { errors: 1, warnings: 1 }, + { errors: 1, warnings: 2 }, + { errors: 2, warnings: 1 }, + { errors: 2, warnings: 2 }, + { errors: 100, warnings: 100 }, + ]; + + for (var i in tests) { + var test = tests[i]; + + var button = document.createElement("button"); + var content = ""; + if (!test.errors && !test.warnings) + content = "(nothing)"; + else { + if (test.errors > 0) + content += test.errors + " error" + (test.errors != 1 ? "s" : ""); + if (test.warnings > 0) { + if (content.length) + content += ", "; + content += test.warnings + " warning" + (test.warnings != 1 ? "s" : "") + } + } + button.innerText = content; + button.onclick = clickHandler(test.errors, test.warnings); + var p = document.createElement("p"); + p.appendChild(button); + document.body.appendChild(p); + } + } +</script> +<body onload="loaded()"> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=18650">Bug 18650: +Errors/warnings in Inspector should be visible outside of Resources</a>.</p> +<p>To test, open the Inspector and click one of the buttons below. You should +see an error and/or warning count in the Inspector's status bar. Clicking on +the error/warning count should open the Console. Hovering over the +error/warning count should show you a tooltip that matches the text in the +button you clicked.</p> +<p>Note: You must reload the page between each button press.</p> |