diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/manual-tests/inspector | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/manual-tests/inspector')
28 files changed, 613 insertions, 0 deletions
diff --git a/WebCore/manual-tests/inspector/command-line-api.html b/WebCore/manual-tests/inspector/command-line-api.html new file mode 100644 index 0000000..8b9a153 --- /dev/null +++ b/WebCore/manual-tests/inspector/command-line-api.html @@ -0,0 +1,6 @@ +<script type="text/javascript" charset="utf-8"> + var $ = function() { console.log("OK") }; +</script> + +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=20385">Bug 20385: Firebug command line extensions interfere with existing objects</a>.</p> +<p>To test, execute "$()" in the Inspector's Console. Also trying setting $.</p> diff --git a/WebCore/manual-tests/inspector/console-assert.html b/WebCore/manual-tests/inspector/console-assert.html new file mode 100644 index 0000000..df2c4cc --- /dev/null +++ b/WebCore/manual-tests/inspector/console-assert.html @@ -0,0 +1,37 @@ +<script> + function createClickHandler(result, str) { + return function() { + console.assert(result, "%s", str); + } + } + + function load() { + var tests = [ + "", + "false", + "null", + "document.body", + "!document.body", + "true" + ]; + + for (var i = 0; i < tests.length; ++i) { + var test = tests[i]; + var result; + try { + result = eval(test); + } catch(e) { + result = false; + } + var button = document.createElement("button"); + button.innerText = "console.assert(" + test + "): should" + (result ? " not" : "") + " assert"; + button.onclick = createClickHandler(result, test); + var p = document.createElement("p"); + p.appendChild(button); + document.body.appendChild(p); + } + } +</script> +<body onload="load()"> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19134">Bug 19134: Inspector should support console.assert</a>.</p> +<p>To test, click the buttons below and look at the Inspector's Console.</p> diff --git a/WebCore/manual-tests/inspector/console-call-line-numbers.html b/WebCore/manual-tests/inspector/console-call-line-numbers.html new file mode 100644 index 0000000..ae831c5 --- /dev/null +++ b/WebCore/manual-tests/inspector/console-call-line-numbers.html @@ -0,0 +1,14 @@ +<script> + console.info("Test console.info"); + console.log("Test console.log"); + console.warn("Test console.warn"); + console.error("Test console.error"); + console.time("Test console.time"); + console.timeEnd("Test console.time"); + console.count("Test console.count"); + console.assert(false, "Test console.assert"); +</script> +<script src="resources/script-console-calls.js"></script> +<body> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=17234">Bug 17234: Inspector should link console.{log,warn,info,error} back to call site</a>.</p> +<p>To test, open the Inspector's Console and verify that all console messages have correct resource URLs and line numbers. Also verify that errors and warnings show up inline as bubbles in the resource source view.</p> diff --git a/WebCore/manual-tests/inspector/console-log-formatting.html b/WebCore/manual-tests/inspector/console-log-formatting.html new file mode 100644 index 0000000..d59ebc9 --- /dev/null +++ b/WebCore/manual-tests/inspector/console-log-formatting.html @@ -0,0 +1,68 @@ +<script> + var s = "this is a string"; + var i = 5; + var ni = -5; + var f = 3.14159; + var o = { prop1: 1, prop2: 2 }; + var specifiers = { + s: "string", + i: "integer", + d: "integer", + f: "float", + "0.3f": "float with precision", + o: "object", + z: "unsupported", + }; + + function test(args) { + var functions = ["log", "debug"]; + for (var i = 0; i < functions.length; ++i) { + console.info("console." + functions[i] + "(%s)", args); + try { + eval("console." + functions[i] + "(" + args + ")"); + } catch (e) { + console.error(e); + } + } + } + + function testAllSpecifiers(value, description) { + for (var specifier in specifiers) + test("'Format " + description + " as " + specifiers[specifier] + ": %" + specifier + "', " + value + ""); + } + + function runTests() { + var values = [ + { value: "window.noSuchVariable", description: "undefined" }, + { value: "s", description: "string" }, + { value: "i", description: "positive integer" }, + { value: "ni", description: "negative integer" }, + { value: "f", description: "float" }, + { value: "o", description: "object" }, + { value: "document.body", description: "body" }, + { value: "/test/", description: "RegExp" }, + { value: "true", description: "boolean" }, + { value: "null", description: "null" }, + ]; + + for (var i = 0; i < values.length; ++i) + testAllSpecifiers(values[i].value, values[i].description); + + var tests = [ + "'simple test'", + "'multiple', 'parameters', 'should', 'be', 'concatenated'", + "document", + "document, document.body, window, window.location", + "document, document.body, 'hello', 'goodbye', window.location", + "'Format string with fewer specifiers than parameters: %o %i %f', document.body, i, f, ni, o", + "'Format string with more specifiers than parameters: %o %i %f %i %o', document.body, i, f", + ]; + + for (var i = 0; i < tests.length; ++i) + test(tests[i]); + + } +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=17228">Bug 17228: console.{log,warn,info,error} should support format strings, variable arguments</a>.</p> +<p>Open the Inspector (right-click and choose "Inspect Element"), then click the "Run Tests" button.</p> +<button onclick="runTests()">Run Tests</button> diff --git a/WebCore/manual-tests/inspector/console-time.html b/WebCore/manual-tests/inspector/console-time.html new file mode 100644 index 0000000..6c24373 --- /dev/null +++ b/WebCore/manual-tests/inspector/console-time.html @@ -0,0 +1,33 @@ +<script> +function test() { + // Test 1: call timeEnd before time + console.log(">>>console.timeEnd(\"1\")"); + console.timeEnd("1"); + // Test 2: call time two times before timeEnd + console.log(">>>console.time(\"2\")"); + console.time("2"); + setTimeout(function() { + console.log(">>>console.time(\"2\")"); + console.time("2"); + console.log(">>>console.timeEnd(\"2\")"); + console.timeEnd("2"); + console.log("2: If it says ~1000ms the first time is not overwritten."); + }, 1000); + // Test 3: call timeEnd two times + console.log(">>>console.time(\"3\")"); + console.time("3"); + console.log(">>>console.timeEnd(\"3\")"); + console.timeEnd("3"); + console.log(">>>console.timeEnd(\"3\")"); + console.timeEnd("3"); + // Test 4: call time/timeEnd without title parameter + console.log(">>>console.time()"); + console.time(); + console.log(">>>console.timeEnd()"); + console.timeEnd(); +}; + +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19159">Bug 19159: Inspector should support console.time/console.timeEnd</a>.</p> +<p>Open the Inspector (right-click and choose "Inspect Element"), then click the "Run Tests" button.</p> +<button onclick="test()">Run Tests</button>
\ No newline at end of file diff --git a/WebCore/manual-tests/inspector/debugger-execution-while-paused.html b/WebCore/manual-tests/inspector/debugger-execution-while-paused.html new file mode 100644 index 0000000..67446d4 --- /dev/null +++ b/WebCore/manual-tests/inspector/debugger-execution-while-paused.html @@ -0,0 +1,15 @@ +<script> +function stepOne() +{ + var x = 1; +} + +function stepTwo() +{ + alert("Test failed. The second button event still fired."); +} +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=20284">Bug 20284: JavaScript can be executed even though debugger is running and at a break point</a>.</p> +<p>To test, open the Inspector and start a debugging session. Set a break point inside the stepOne() function. Now click the Step One button in the page. The breakpoint should be hit. While paused at the breakpoint click on the Step Two button. You should not see an alert dialog.</p> +<button onclick="stepOne()">Step One</button><br><br> +<button onclick="stepTwo()">Step Two</button><br><br> diff --git a/WebCore/manual-tests/inspector/debugger-pause-during-load.html b/WebCore/manual-tests/inspector/debugger-pause-during-load.html new file mode 100644 index 0000000..631cafc --- /dev/null +++ b/WebCore/manual-tests/inspector/debugger-pause-during-load.html @@ -0,0 +1,5 @@ +<script> +debugger; // You should see this code and execution line in the Scripts panel. +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19053">Bug 19053: Source code not visible when script is paused before onload fires</a>.</p> +<p>To test, open the Inspector and start a debugging session. You should see this file and execution line in the Scripts panel.</p> diff --git a/WebCore/manual-tests/inspector/debugger-pause-on-else-statements.html b/WebCore/manual-tests/inspector/debugger-pause-on-else-statements.html new file mode 100644 index 0000000..424fb7e --- /dev/null +++ b/WebCore/manual-tests/inspector/debugger-pause-on-else-statements.html @@ -0,0 +1,18 @@ +<script> +function test() +{ + debugger; +} + +if (false) + debugger; // This should not be hit. +else + test(); +</script> + +Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=21944">Bug 21944: Can't set a breakpoint on the statement after a single line "else"</a>. +<br><br> +Start a debugging session in the Web Inspector and open this file. When the debugger breaks, select the (program) node +in the call stack, you should see the execution line on the call to test(). +<br><br> +Also set a breakpoint on the call to test(), and reload. It should break before the test() function is called. diff --git a/WebCore/manual-tests/inspector/debugger-pause-on-for-in-statements.html b/WebCore/manual-tests/inspector/debugger-pause-on-for-in-statements.html new file mode 100644 index 0000000..c0c24e0 --- /dev/null +++ b/WebCore/manual-tests/inspector/debugger-pause-on-for-in-statements.html @@ -0,0 +1,18 @@ +<script> +function test() +{ + debugger; +} + +var object = { test: 1 }; + +for (var property in object) + test(); +</script> + +Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=22004">Bug 22004: Can't set a breakpoint on the statement after a single line "for"</a>. +<br><br> +Start a debugging session in the Web Inspector and open this file. When the debugger breaks, select the (program) node +in the call stack, you should see the execution line on the call to test(). +<br><br> +Also set a breakpoint on the call to test(), and reload. It should break before the test() function is called. diff --git a/WebCore/manual-tests/inspector/debugger-pause-on-for-statements.html b/WebCore/manual-tests/inspector/debugger-pause-on-for-statements.html new file mode 100644 index 0000000..43a63e2 --- /dev/null +++ b/WebCore/manual-tests/inspector/debugger-pause-on-for-statements.html @@ -0,0 +1,16 @@ +<script> +function test() +{ + debugger; +} + +for (var i = 0; i < 1; ++i) + test(); +</script> + +Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=22004">Bug 22004: Can't set a breakpoint on the statement after a single line "for"</a>. +<br><br> +Start a debugging session in the Web Inspector and open this file. When the debugger breaks, select the (program) node +in the call stack, you should see the execution line on the call to test(). +<br><br> +Also set a breakpoint on the call to test(), and reload. It should break before the test() function is called. diff --git a/WebCore/manual-tests/inspector/debugger-status-bar-buttons-state.html b/WebCore/manual-tests/inspector/debugger-status-bar-buttons-state.html new file mode 100644 index 0000000..31ca3b1 --- /dev/null +++ b/WebCore/manual-tests/inspector/debugger-status-bar-buttons-state.html @@ -0,0 +1,2 @@ +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19173">Bug 19173: Tool tips for Inspector debugger status bar buttons are wrong/missing</a>.</p> +<p>To test, open the Inspector and go to the Scripts panel. Check that the tool tips for the debugger's two status bar buttons make sense when each button is toggled on and off.</p> diff --git a/WebCore/manual-tests/inspector/display-sql-null.html b/WebCore/manual-tests/inspector/display-sql-null.html new file mode 100644 index 0000000..1d1403b --- /dev/null +++ b/WebCore/manual-tests/inspector/display-sql-null.html @@ -0,0 +1,21 @@ +<script> + try { + var db = openDatabase("InspectorTest", "0.1", "Database for Inspector tests", 200000); + db.transaction(function(tx) { + tx.executeSql("CREATE TABLE DisplaySQLNull (test TEXT)", [], function(tx) { + tx.executeSql("INSERT INTO DisplaySQLNull (test) VALUES (NULL)"); + }) + }); + } catch (e) { + } +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=18837">Bug 18837: Database panel fails to display tables if any value is NULL</a>.</p> +<p>To test:</p> +<ol> + <li>Open the Inspector</li> + <li>Go to the Databases panel</li> + <li>Click on the <code>DisplaySQLNull</code> table inside the <code>InspectorTest</code> database</li> +</ol> +<p>If the contents of the table appear (a single row with the value +"<code>null</code>" in the <code>test</code> column), you have passed the +test.</p> diff --git a/WebCore/manual-tests/inspector/display-sql-transaction-error.html b/WebCore/manual-tests/inspector/display-sql-transaction-error.html new file mode 100644 index 0000000..da2d310 --- /dev/null +++ b/WebCore/manual-tests/inspector/display-sql-transaction-error.html @@ -0,0 +1,24 @@ +<script> + try { + var db = openDatabase("InspectorTest", "0.1", "Database for Inspector tests", 200000); + db.transaction(function(tx) { + tx.executeSql("CREATE TABLE DisplaySQLTransactionError (test TEXT)", []); + }); + } catch (e) { + } +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19438">Bug 19438: Transaction errors are never displayed in database query view</a>.</p> +<p>To test:</p> +<ol> + <li>Open the Inspector</li> + <li>Go to the Databases panel</li> + <li>Click on the <code>InspectorTest</code> database</li> + <li>Enter the following text on the query input line: <code>INSERT INTO DisplaySQLTransactionError (test) VALUES (NULL)</code></li> +</ol> +<p>If the line of text you entered remains and an error line is output below +it, you have passed the test.</p> +<p>If the line of text you entered disappears and no error line is output, you +have failed the test.</p> +<p>If the line of text you entered remains and no error line is output, then +the test has become invalid and needs to be modified to cause the error +callback passed by the Inspector to <code>db.transaction</code> to be called.</p> diff --git a/WebCore/manual-tests/inspector/dom-mutation.html b/WebCore/manual-tests/inspector/dom-mutation.html new file mode 100644 index 0000000..33e8333 --- /dev/null +++ b/WebCore/manual-tests/inspector/dom-mutation.html @@ -0,0 +1,31 @@ +<script> +function test1() { + document.getElementById("test").src = "resources/mutate-frame.html"; +} + +function test2() { + document.getElementById("test").src = "resources/mutate-frame-2.html"; +} + +var count = 1; +function run() { + var container = document.getElementById("test2"); + var div = document.createElement("div"); + div.textContent = "Testing " + (count++); + container.appendChild(div); + if (count > 10) + container.removeChild(container.firstChild); +} + +setInterval(run, 1000); +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=6590">Bug 6590: Web Inspector shows stale DOM tree if the DOM changes after the inspector has loaded</a>.</p> +<p>To test, open the Inspector and watch the DOM change to match the page. Clicking the buttons will navigate the subframe, and the all the subframe child nodes should change.</p> +<div style="clear: both"> +<button onclick="test1()">Test Frame 1</button> +<button onclick="test2()">Test Frame 2</button> +</div> +<div style="float: left"> +<iframe id="test" src="resources/mutate-frame.html" width="200" height="300"></iframe> +</div> +<div style="float: left; margin-left: 10px;" id="test2"></div> 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> diff --git a/WebCore/manual-tests/inspector/errors-with-space in-url.html b/WebCore/manual-tests/inspector/errors-with-space in-url.html new file mode 100644 index 0000000..07e8ee0 --- /dev/null +++ b/WebCore/manual-tests/inspector/errors-with-space in-url.html @@ -0,0 +1,7 @@ +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19065">Bug 19065: +Resources with a space in their URL don't get error/warning bubbles</a>.</p> +<p>To test, open the Inspector and refresh this page. There should be a red +bubble with the number "1" in it next to the main resource in the Resources +panel. Clicking the button below should change the "1" to a "2".</p> +<p></p></p> +<button onclick="console.error('hi')">click me</button> diff --git a/WebCore/manual-tests/inspector/escape-links.html b/WebCore/manual-tests/inspector/escape-links.html new file mode 100644 index 0000000..5c5f6c0 --- /dev/null +++ b/WebCore/manual-tests/inspector/escape-links.html @@ -0,0 +1 @@ +<html> diff --git a/WebCore/manual-tests/inspector/forzen-ui-while-paused.html b/WebCore/manual-tests/inspector/forzen-ui-while-paused.html new file mode 100644 index 0000000..b8d50b0 --- /dev/null +++ b/WebCore/manual-tests/inspector/forzen-ui-while-paused.html @@ -0,0 +1,11 @@ +<script> +function foo() { + var timeout = setTimeout(function() { alert("This should not happen. If you do see this alert, then timers on the page are firing while paused!") }, 0); + debugger; + clearTimeout(timeout); +} + +setTimeout(foo, 100); +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=20042">Bug 20042: UI frozen when the debugger is paused</a>.</p> +<p>Open the inspector and start debugging in the Scripts panel. While paused, try to open the Console. The Console should animate open fully.</p> diff --git a/WebCore/manual-tests/inspector/highlight-source-line.html b/WebCore/manual-tests/inspector/highlight-source-line.html new file mode 100644 index 0000000..2520485 --- /dev/null +++ b/WebCore/manual-tests/inspector/highlight-source-line.html @@ -0,0 +1,4 @@ +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19204">Bug 19204: Inspector should highlight source lines when following links to them</a>.</p> +<p>To test, open the Inspector and reload this page. Then open the Inspector's Console and click the link for the markup error. You should see the line containing the error briefly highlighted in the source view.</p> + +<p>This line contains a markup error</i>.</p> diff --git a/WebCore/manual-tests/inspector/multiple-console-messages.html b/WebCore/manual-tests/inspector/multiple-console-messages.html new file mode 100644 index 0000000..842e6aa --- /dev/null +++ b/WebCore/manual-tests/inspector/multiple-console-messages.html @@ -0,0 +1,86 @@ +<html> +<head> + <script> + function generateErrors(number) + { + for (var i = 0; i < number; ++i) + console.error("This is an error."); + } + + function generateLogs(number) + { + for (var i = 0; i < number; ++i) + console.log("This is a log."); + } + + function generateWarnings(number) + { + for (var i = 0; i < number; ++i) + console.warn("This is a warning."); + } + + function generateInfos(number) + { + for (var i = 0; i < number; ++i) + console.info("This is an info."); + } + + function startTest() + { + generateErrors(3); + generateLogs(3); + generateWarnings(3); + + console.group(); + + generateErrors(2); + generateLogs(1); + generateErrors(2); + + generateLogs(2); + generateWarnings(1); + generateLogs(2); + + generateWarnings(2); + generateErrors(1); + generateWarnings(2); + + console.groupEnd(); + + generateErrors(1); + console.group(); + generateErrors(1); + console.group(); + generateErrors(1); + console.groupEnd(); + generateErrors(1); + console.groupEnd(); + generateErrors(1); + + console.warn("Same message, different level"); + console.error("Same message, different level"); + console.log("Same message, different level"); + console.info("Same message, different level"); + + console.log("Variadic message: %s", "message 1"); + console.log("Variadic message: %s", "message 2"); + console.log("Variadic message: %s", "message 3"); + console.log("Variadic message: %s", "message 4"); + + console.warn("Warning and error on same line."); console.error("Warning and error on same line."); console.warn("Warning and error on same line."); console.error("Warning and error on same line."); + + } + </script> +</head> +<body onload="startTest()"> +This test generates warnings, errors, and logs to test the grouping of repeated +messages in the Web Inspector. To check this test open the Web Inspector and see +that there are never any repeated messages that don't have a number next to them. +<br> +<br> +<input type="button" onclick="generateErrors(1)" value="Put Error in Console"></input> +<br> +<input type="button" onclick="generateLogs(1)" value="Put Log in Console"></input> +<br> +<input type="button" onclick="generateWarnings(1)" value="Put Warning in Console"></input> +</body> diff --git a/WebCore/manual-tests/inspector/profiler-test-call.html b/WebCore/manual-tests/inspector/profiler-test-call.html new file mode 100644 index 0000000..572a2e9 --- /dev/null +++ b/WebCore/manual-tests/inspector/profiler-test-call.html @@ -0,0 +1,35 @@ +<html> +<head> +<script src="resources/profiler-test-JS-resources.js"></script> +<script> +console.profile("Using the call() method"); +function startTest() +{ + var myObject = new fakeObject(1, 2); + endTest(); +} + +function fakeObject (x, y) +{ + this.x = x; + fakeInteriorFunction.call(this, y); +} + +function fakeInteriorFunction(y) +{ + this.y = y; +} + +</script> +</head> + +<body onload="startTest()"> +This page's JavaScript has a call to call() in it. +<br> +<br> +To use this test, load it in the browser then load the WebInspector and look at +the profile. In the profile there should be a call to fakeObject() with call() as +its child and a fakeInteriorFunction() as call()'s child. +<div id="output"></div> +</body> +</html> diff --git a/WebCore/manual-tests/inspector/profiler-test-many-calls-in-the-same-scope.html b/WebCore/manual-tests/inspector/profiler-test-many-calls-in-the-same-scope.html new file mode 100644 index 0000000..da5be42 --- /dev/null +++ b/WebCore/manual-tests/inspector/profiler-test-many-calls-in-the-same-scope.html @@ -0,0 +1,42 @@ +<html> +<head> +<script src="resources/profiler-test-JS-resources.js"></script> +<script> +console.profile("Many Calls In The Same Scope"); +function startTest() +{ + insertNewText(); + insertGivenText("This was a triumph."); + arrayOperatorFunction(7); + intermediaryFunction(); + anonymousFunction(); + end() + endT(); + endT(); + endTest(); +} + +function end() +{ + var x = 0; +} + +function endT() +{ + var y = 1; +} + +</script> +</head> + +<body onload="startTest()"> +This page's JavaScript has many function calls in the same scope. +<br> +<br> +To use this test, load it in the browser then load the WebInspector and look at +the profile. In the profile many functions should be the children of startTest. +Use the sorting capabilites to make sure the similarly named functions are sorted +correctly. +<div id="output"></div> +</body> +</html>
\ No newline at end of file diff --git a/WebCore/manual-tests/inspector/resources/mutate-frame-2.html b/WebCore/manual-tests/inspector/resources/mutate-frame-2.html new file mode 100644 index 0000000..9d413b9 --- /dev/null +++ b/WebCore/manual-tests/inspector/resources/mutate-frame-2.html @@ -0,0 +1,12 @@ +<script> +var count = 1; +function run() { + var div = document.createElement("div"); + div.textContent = "Testing " + (count++); + document.body.appendChild(div); + if (count > 10) + document.body.removeChild(document.body.firstChild); +} + +setInterval(run, 1000); +</script> diff --git a/WebCore/manual-tests/inspector/resources/mutate-frame.html b/WebCore/manual-tests/inspector/resources/mutate-frame.html new file mode 100644 index 0000000..08fc656 --- /dev/null +++ b/WebCore/manual-tests/inspector/resources/mutate-frame.html @@ -0,0 +1,10 @@ +<script> +var count = 1; +function run() { + var div = document.createElement("div"); + div.textContent = "Testing " + (count++); + document.body.appendChild(div); +} + +setInterval(run, 1000); +</script> diff --git a/WebCore/manual-tests/inspector/resources/script-console-calls.js b/WebCore/manual-tests/inspector/resources/script-console-calls.js new file mode 100644 index 0000000..9c7bc35 --- /dev/null +++ b/WebCore/manual-tests/inspector/resources/script-console-calls.js @@ -0,0 +1,8 @@ +console.info("Test console.info"); +console.log("Test console.log"); +console.warn("Test console.warn"); +console.error("Test console.error"); +console.time("Test console.time"); +console.timeEnd("Test console.time"); +console.count("Test console.count"); +console.assert(false, "Test console.assert"); diff --git a/WebCore/manual-tests/inspector/resources/script-error.js b/WebCore/manual-tests/inspector/resources/script-error.js new file mode 100644 index 0000000..c8be5ea --- /dev/null +++ b/WebCore/manual-tests/inspector/resources/script-error.js @@ -0,0 +1,6 @@ +var test = document.body; +this.will.be.an.error = 1; + +function test() { + return 42; +} diff --git a/WebCore/manual-tests/inspector/returnEvent-crash.html b/WebCore/manual-tests/inspector/returnEvent-crash.html new file mode 100644 index 0000000..5dd1119 --- /dev/null +++ b/WebCore/manual-tests/inspector/returnEvent-crash.html @@ -0,0 +1,17 @@ +<script> + function test2() { + var y = 6; + y += 3; + return y; + } + + function test() { + var x = 5; + eval("test2()"); + x += 6; + return x; + } +</script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19038">Bug 19038: Crash in JavaScriptDebugServer::returnEvent when inspecting an attached Inspector</a>.</p> +<p>To test, open and attach the Inspector's debugger, then click the button below. If you don't crash, you have passed the test.</p> +<button onclick="test()">click me</button> diff --git a/WebCore/manual-tests/inspector/styled-error-bubbles-in-scripts.html b/WebCore/manual-tests/inspector/styled-error-bubbles-in-scripts.html new file mode 100644 index 0000000..0049cef --- /dev/null +++ b/WebCore/manual-tests/inspector/styled-error-bubbles-in-scripts.html @@ -0,0 +1,6 @@ +<script src="resources/script-error.js"></script> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=20345">Bug 19065: +Error bubbles are clobbered when syntax highlighting JavaScript resources</a>.</p> +<p>To test, open the Inspector. There should be a red bubble with the number "1" +in it next to the the only script resource in the Resources panel. Clicking the +resource should show syntax highlighted JavaScript with a red error bubble.</p> |