Commit d7e4bf7f authored by kmccullough@apple.com's avatar kmccullough@apple.com
Browse files

WebCore:

2008-10-23  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim Hatcher.

        https://bugs.webkit.org/show_bug.cgi?id=21817
        Bug 21817: Manual profiler tests should be made into layout tests

        -Moving the tests before diffing so that it's clear what changed.

        * manual-tests/inspector/profiler-test-anonymous-event-handler.html: Removed.
        * manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html: Removed.
        * manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html: Removed.
        * manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html: Removed.
        * manual-tests/inspector/profiler-test-apply.html: Removed.
        * manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html: Removed.
        * manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html: Removed.
        * manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Removed.
        * manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html: Removed.
        * manual-tests/inspector/profiler-test-compare-multiple-profiles.html: Removed.
        * manual-tests/inspector/profiler-test-constructor.html: Removed.
        * manual-tests/inspector/profiler-test-dead-time.html: Removed.
        * manual-tests/inspector/profiler-test-deep-recursion.html: Removed.
        * manual-tests/inspector/profiler-test-document-dot-write.html: Removed.
        * manual-tests/inspector/profiler-test-event-handler.html: Removed.
        * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html: Removed.
        * manual-tests/inspector/profiler-test-heavy-view.html: Removed.
        * manual-tests/inspector/profiler-test-inline-event-handler.html: Removed.
        * manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html: Removed.
        * manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html: Removed.
        * manual-tests/inspector/profiler-test-multiple-frames.html: Removed.
        * manual-tests/inspector/profiler-test-multiple-windows.html: Removed.
        * manual-tests/inspector/profiler-test-nested-anonymous-functon.html: Removed.
        * manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html: Removed.
        * manual-tests/inspector/profiler-test-no-execution-context.html: Removed.
        * manual-tests/inspector/profiler-test-one-execution-context.html: Removed.
        * manual-tests/inspector/profiler-test-profile-calls-in-included-file.html: Removed.
        * manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Removed.
        * manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html: Removed.
        * manual-tests/inspector/profiler-test-simple-event-call.html: Removed.
        * manual-tests/inspector/profiler-test-simple-no-level-change.html: Removed.
        * manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html: Removed.
        * manual-tests/inspector/profiler-test-start-and-stop-profiling-in-the-same-function.html: Removed.
        * manual-tests/inspector/profiler-test-start-but-dont-stop-profiling.html: Removed.
        * manual-tests/inspector/profiler-test-stop-profiling-after-setTimeout.html: Removed.
        * manual-tests/inspector/profiler-test-stop-then-function-call.html: Removed.
        * manual-tests/inspector/profiler-test-throw-exception-from-eval.html: Removed.
        * manual-tests/inspector/profiler-test-two-execution-contexts.html: Removed.
        * manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html: Removed.
        * manual-tests/inspector/profiler-test-window-dot-eval.html: Removed.
        * manual-tests/inspector/resources/other-frame.html: Removed.
        * manual-tests/inspector/resources/other-window.html: Removed.
        * manual-tests/inspector/resources/profiler-test-JS-resources.js: Removed.

LayoutTests:

2008-10-23  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim Hatcher.

        https://bugs.webkit.org/show_bug.cgi?id=21817
        Bug 21817: Manual profiler tests should be made into layout tests

        -Moving the tests before diffing so that it's clear what changed.

        * platform/mac/Skipped: Skipping until the new files are in place.
        * platform/win/Skipped:
        * fast/profiler: Added.
        * fast/profiler/anonymous-event-handler.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-anonymous-event-handler.html.
        * fast/profiler/anonymous-function-called-from-different-contexts.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html.
        * fast/profiler/anonymous-function-calls-built-in-functions.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html.
        * fast/profiler/anonymous-function-calls-eval.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html.
        * fast/profiler/apply.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-apply.html.
        * fast/profiler/built-in-function-calls-anonymous.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html.
        * fast/profiler/built-in-function-calls-user-defined-function.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html.
        * fast/profiler/call-nodelist-as-function.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-call-nodelist-as-function.html.
        * fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html.
        * fast/profiler/compare-multiple-profiles.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-compare-multiple-profiles.html.
        * fast/profiler/constructor.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-constructor.html.
        * fast/profiler/dead-time.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-dead-time.html.
        * fast/profiler/deep-recursion.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-deep-recursion.html.
        * fast/profiler/document-dot-write.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-document-dot-write.html.
        * fast/profiler/event-handler.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-event-handler.html.
        * fast/profiler/execution-context-and-eval-on-same-line.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html.
        * fast/profiler/heavy-view.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-heavy-view.html.
        * fast/profiler/inline-event-handler.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-inline-event-handler.html.
        * fast/profiler/multiple-and-different-scoped-anonymous-function-calls.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html.
        * fast/profiler/multiple-and-different-scoped-function-calls.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html.
        * fast/profiler/multiple-frames.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-multiple-frames.html.
        * fast/profiler/multiple-windows.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-multiple-windows.html.
        * fast/profiler/nested-anonymous-functon.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-nested-anonymous-functon.html.
        * fast/profiler/nested-start-and-stop-profiler.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html.
        * fast/profiler/no-execution-context.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-no-execution-context.html.
        * fast/profiler/one-execution-context.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-one-execution-context.html.
        * fast/profiler/profile-calls-in-included-file.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-profile-calls-in-included-file.html.
        * fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html.
        * fast/profiler/profiling-from-a-nested-location.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html.
        * fast/profiler/resources: Added.
        * fast/profiler/resources/other-frame.html: Copied from ../WebCore/manual-tests/inspector/resources/other-frame.html.
        * fast/profiler/resources/other-window.html: Copied from ../WebCore/manual-tests/inspector/resources/other-window.html.
        * fast/profiler/resources/profiler-test-JS-resources.js: Copied from ../WebCore/manual-tests/inspector/resources/profiler-test-JS-resources.js.
        * fast/profiler/simple-event-call.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-simple-event-call.html.
        * fast/profiler/simple-no-level-change.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-simple-no-level-change.html.
        * fast/profiler/start-and-stop-profiler-multiple-times.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html.
        * fast/profiler/start-and-stop-profiling-in-the-same-function.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-start-and-stop-profiling-in-the-same-function.html.
        * fast/profiler/start-but-dont-stop-profiling.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-start-but-dont-stop-profiling.html.
        * fast/profiler/stop-profiling-after-setTimeout.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-stop-profiling-after-setTimeout.html.
        * fast/profiler/stop-then-function-call.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-stop-then-function-call.html.
        * fast/profiler/throw-exception-from-eval.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-throw-exception-from-eval.html.
        * fast/profiler/two-execution-contexts.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-two-execution-contexts.html.
        * fast/profiler/user-defined-function-calls-built-in-functions.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html.
        * fast/profiler/window-dot-eval.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-window-dot-eval.html.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 590933d6
2008-10-23 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim Hatcher.
https://bugs.webkit.org/show_bug.cgi?id=21817
Bug 21817: Manual profiler tests should be made into layout tests
-Moving the tests before diffing so that it's clear what changed.
* platform/mac/Skipped: Skipping until the new files are in place.
* platform/win/Skipped:
* fast/profiler: Added.
* fast/profiler/anonymous-event-handler.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-anonymous-event-handler.html.
* fast/profiler/anonymous-function-called-from-different-contexts.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html.
* fast/profiler/anonymous-function-calls-built-in-functions.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html.
* fast/profiler/anonymous-function-calls-eval.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html.
* fast/profiler/apply.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-apply.html.
* fast/profiler/built-in-function-calls-anonymous.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html.
* fast/profiler/built-in-function-calls-user-defined-function.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html.
* fast/profiler/call-nodelist-as-function.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-call-nodelist-as-function.html.
* fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html.
* fast/profiler/compare-multiple-profiles.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-compare-multiple-profiles.html.
* fast/profiler/constructor.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-constructor.html.
* fast/profiler/dead-time.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-dead-time.html.
* fast/profiler/deep-recursion.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-deep-recursion.html.
* fast/profiler/document-dot-write.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-document-dot-write.html.
* fast/profiler/event-handler.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-event-handler.html.
* fast/profiler/execution-context-and-eval-on-same-line.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html.
* fast/profiler/heavy-view.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-heavy-view.html.
* fast/profiler/inline-event-handler.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-inline-event-handler.html.
* fast/profiler/multiple-and-different-scoped-anonymous-function-calls.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html.
* fast/profiler/multiple-and-different-scoped-function-calls.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html.
* fast/profiler/multiple-frames.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-multiple-frames.html.
* fast/profiler/multiple-windows.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-multiple-windows.html.
* fast/profiler/nested-anonymous-functon.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-nested-anonymous-functon.html.
* fast/profiler/nested-start-and-stop-profiler.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html.
* fast/profiler/no-execution-context.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-no-execution-context.html.
* fast/profiler/one-execution-context.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-one-execution-context.html.
* fast/profiler/profile-calls-in-included-file.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-profile-calls-in-included-file.html.
* fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html.
* fast/profiler/profiling-from-a-nested-location.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html.
* fast/profiler/resources: Added.
* fast/profiler/resources/other-frame.html: Copied from ../WebCore/manual-tests/inspector/resources/other-frame.html.
* fast/profiler/resources/other-window.html: Copied from ../WebCore/manual-tests/inspector/resources/other-window.html.
* fast/profiler/resources/profiler-test-JS-resources.js: Copied from ../WebCore/manual-tests/inspector/resources/profiler-test-JS-resources.js.
* fast/profiler/simple-event-call.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-simple-event-call.html.
* fast/profiler/simple-no-level-change.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-simple-no-level-change.html.
* fast/profiler/start-and-stop-profiler-multiple-times.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html.
* fast/profiler/start-and-stop-profiling-in-the-same-function.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-start-and-stop-profiling-in-the-same-function.html.
* fast/profiler/start-but-dont-stop-profiling.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-start-but-dont-stop-profiling.html.
* fast/profiler/stop-profiling-after-setTimeout.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-stop-profiling-after-setTimeout.html.
* fast/profiler/stop-then-function-call.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-stop-then-function-call.html.
* fast/profiler/throw-exception-from-eval.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-throw-exception-from-eval.html.
* fast/profiler/two-execution-contexts.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-two-execution-contexts.html.
* fast/profiler/user-defined-function-calls-built-in-functions.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html.
* fast/profiler/window-dot-eval.html: Copied from ../WebCore/manual-tests/inspector/profiler-test-window-dot-eval.html.
2008-10-23 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Maciej Stachowiak.
......
......@@ -12,3 +12,6 @@ printing
# https://bugs.webkit.org/show_bug.cgi?id=20342 REGRESSION: fast/dom/cssTarget-crash.html fails
fast/dom/cssTarget-crash.html
#Bug 21817: Manual profiler tests should be made into layout tests - skipping these until they are fuly changed.
fast/profile
......@@ -26,6 +26,9 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#Bug 21817: Manual profiler tests should be made into layout tests - Skipping these until they are fully changed.
fast/profile
# Should be moved to platform/mac <rdar://5621425>
http/tests/misc/willCacheResponse-delegate-callback.html
......
2008-10-23 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim Hatcher.
https://bugs.webkit.org/show_bug.cgi?id=21817
Bug 21817: Manual profiler tests should be made into layout tests
-Moving the tests before diffing so that it's clear what changed.
* manual-tests/inspector/profiler-test-anonymous-event-handler.html: Removed.
* manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html: Removed.
* manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html: Removed.
* manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html: Removed.
* manual-tests/inspector/profiler-test-apply.html: Removed.
* manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html: Removed.
* manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html: Removed.
* manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Removed.
* manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html: Removed.
* manual-tests/inspector/profiler-test-compare-multiple-profiles.html: Removed.
* manual-tests/inspector/profiler-test-constructor.html: Removed.
* manual-tests/inspector/profiler-test-dead-time.html: Removed.
* manual-tests/inspector/profiler-test-deep-recursion.html: Removed.
* manual-tests/inspector/profiler-test-document-dot-write.html: Removed.
* manual-tests/inspector/profiler-test-event-handler.html: Removed.
* manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html: Removed.
* manual-tests/inspector/profiler-test-heavy-view.html: Removed.
* manual-tests/inspector/profiler-test-inline-event-handler.html: Removed.
* manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html: Removed.
* manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html: Removed.
* manual-tests/inspector/profiler-test-multiple-frames.html: Removed.
* manual-tests/inspector/profiler-test-multiple-windows.html: Removed.
* manual-tests/inspector/profiler-test-nested-anonymous-functon.html: Removed.
* manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html: Removed.
* manual-tests/inspector/profiler-test-no-execution-context.html: Removed.
* manual-tests/inspector/profiler-test-one-execution-context.html: Removed.
* manual-tests/inspector/profiler-test-profile-calls-in-included-file.html: Removed.
* manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Removed.
* manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html: Removed.
* manual-tests/inspector/profiler-test-simple-event-call.html: Removed.
* manual-tests/inspector/profiler-test-simple-no-level-change.html: Removed.
* manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html: Removed.
* manual-tests/inspector/profiler-test-start-and-stop-profiling-in-the-same-function.html: Removed.
* manual-tests/inspector/profiler-test-start-but-dont-stop-profiling.html: Removed.
* manual-tests/inspector/profiler-test-stop-profiling-after-setTimeout.html: Removed.
* manual-tests/inspector/profiler-test-stop-then-function-call.html: Removed.
* manual-tests/inspector/profiler-test-throw-exception-from-eval.html: Removed.
* manual-tests/inspector/profiler-test-two-execution-contexts.html: Removed.
* manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html: Removed.
* manual-tests/inspector/profiler-test-window-dot-eval.html: Removed.
* manual-tests/inspector/resources/other-frame.html: Removed.
* manual-tests/inspector/resources/other-window.html: Removed.
* manual-tests/inspector/resources/profiler-test-JS-resources.js: Removed.
2008-10-23 Adam Barth <abarth@webkit.org>
 
Reviewed by Sam Weinig.
......
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Anonymous event handler");
function testStart()
{
var buttonWithAnonymousHandler = document.getElementById("buttonWithAnAnonymousEventHandler")
buttonWithAnonymousHandler.onclick = function () {
insertNewText();
}
buttonWithAnonymousHandler.click();
endTest();
}
</script>
</head>
<body onload="testStart()">
This page has an anonymous event handler.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. It should show the anonymous function at the same level as the onload
handler.
<input type="button" id="buttonWithAnAnonymousEventHandler" value="Button with an anonymous event handler">
<div id="output"></div>
</body>
</html>
\ No newline at end of file
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Same anonymous function called from different contexts");
function startTest()
{
anonymousFunction();
eval("anonymousFunction()");
endTest();
}
</script>
</head>
<body onload="startTest()">
This page's JavaScript calls an anonymous function from different contexts.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. Beneath onload and startTest it should show three children, an
anonymous function, script context, and the endTest call.
<div id="output"></div>
</body>
</html>
\ No newline at end of file
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Anonymous function calls built-in functions");
function startTest()
{
anonymousFunction();
endTest();
}
</script>
</head>
<body onload="startTest()">
This page has an anonymous JavaScript function that calls built-in functions.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. Beneath onload and startTest it should show three children, an
anonymous function, script context, and the endTest call.
<div id="output"></div>
</body>
</html>
\ No newline at end of file
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Anonymous function calles eval");
function startTest()
{
var variableThatPointsToAnAnonymousFunction = function() {
eval("insertNewText()");
}
variableThatPointsToAnAnonymousFunction();
endTest();
}
</script>
</head>
<body onload="startTest()">
This page's JavaScript calls an anonymous function which calls eval().
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. Beneath onload and startTest it should show an (anonymous function)
which has a (program) child.
<div id="output"></div>
</body>
</html>
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Using the apply() method");
function startTest()
{
var myObject = new fakeObject(1, 2);
endTest();
}
function fakeObject (x, y)
{
this.x = x;
fakeInteriorFunction.apply(this, arguments);
}
function fakeInteriorFunction(x, y)
{
this.y = y;
}
</script>
</head>
<body onload="startTest()">
This page's JavaScript has a call to apply() 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 fakeInteriorFunction() and
a call to apply().
<div id="output"></div>
</body>
</html>
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Built-in function calls an anonymous function");
function testStart()
{
var myFunction = function(arrayElement) {
return arrayOperatorFunction(arrayElement);
}
var myArray = new Array (0, 1, 2);
myArray.map(myFunction);
endTest();
}
</script>
</head>
<body onload="testStart()">
This page uses a built-in function to call an anonymous function.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. In the profile map() should be the sibling of an (anonymous function)
which has arrayOperatorFunction() as a child.
</body>
</html>
\ No newline at end of file
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Built-in function calls a user defined function");
function testStart()
{
var myArray = new Array (0, 1, 2);
myArray.map(arrayOperatorFunction);
endTest();
}
</script>
</head>
<body onload="testStart()">
This page uses a built-in function to call a user defined function.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. In the profile map() should have arrayOperatorFunction() as a child.
</body>
</html>
\ No newline at end of file
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Call NodeList as function");
function testStart()
{
var brs = document.getElementsByTagName("br");
var br0 = brs(0);
endTest();
}
</script>
</head>
<body onload="testStart()">
This page calls a NodeList as a function (e.g., <code>list(0)</code>).
<br>
<br>
To use this test, load it in a debug build in the browser. You should see a <code>(NodeList object)</code> entry in the profile.
<div id="output"></div>
</body>
</html>
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
function startTest()
{
indirection();
functionWichStartsAndStopsTheProfiler();
endTest();
}
function indirection()
{
functionWichStartsAndStopsTheProfiler();
}
var firstTime = true;
function functionWichStartsAndStopsTheProfiler()
{
if (firstTime) {
console.profile("Calling the same function where the profile started from another function");
firstTime = false;
}
for (var i = 0; i < 10000000; i++)
var b = i + 2;
}
</script>
</head>
<body onload="startTest()">
This page's JavaScript starts profiling from within a function which is then called
later from another context.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. In the profiler you should see a call to indirection() and
functionWichStartsAndStopsTheProfiler()
<div id="output"></div>
</body>
</html>
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
var j = 0;
function test(len) {
for (var i = 0; i < len; ++i)
++j;
test2(2000 - len);
}
function test2(len) {
for (var i = 0; i < len; ++i)
--j;
}
console.profile("Test");
test(100);
console.profileEnd("Test");
console.profile("Test");
test(1000);
console.profileEnd("Test");
</script>
</head>
<body>
This page has multiple profiles with the same name.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. It should not crash or hang and there should be multiple runs of the
same named profile.
<div id="output"></div>
</body>
</html>
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Using a constructor.");
function startTest()
{
var myObject = new fakeObject(1, 2);
endTest();
}
function fakeObject (x, y)
{
var myArray = new Array()
myArray[0] = 5;
}
</script>
</head>
<body onload="startTest()">
This page's JavaScript has a call to new() 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() and Array()
in it.
</body>
</html>
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Dead time in profile.");
function startTest()
{
setTimeout("endTest()", 1234);
}
</script>
</head>
<body onload="startTest()">
This page's JavaScript Has some dead time in the profile.
<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 large amount of the % spent in
(non-JavaScript).
<div id="output"></div>
</body>
</html>
\ No newline at end of file
<html>
<head>
<script>
console.profile("Test deep recursion.");
function startTest()
{
recurse (0);
console.profileEnd();
}
function recurse(depth) {
if (depth < 5000)
recurse(depth + 1);
}
</script>
</head>
<body onload="startTest()">
This page's JavaScript has a very deep recursion.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. The profiler and browser should not crash.
<div id="output"></div>
</body>
</html>
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Call Document.write()");
document.write("<div>This was a triumph.<// div>");
endTest();
</script>
</head>
<body>
This page calls document.write().
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. If there is a profile it should show write().
<div id="output"></div>
</body>
</html>
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Event handler");
function testStart()
{
var myButton = document.getElementById("buttonWithAnEventListener");
myButton.addEventListener('click', insertNewText, false);
myButton.click();
endTest();
}
</script>
</head>
<body onload="testStart()">
This page has an event handler.
<br>
<br>
To use this test, load it in the browser then load the WebInspector and look at
the profile. In the profile insertnewText() should be a sibling to onload().
<input type="button" id="buttonWithAnEventListener" value="Button with an event listener">
<div id="output"></div>
</body>
</html>
\ No newline at end of file
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
console.profile("Two Execution Contexts on the same line");
function testStart()
{
evalFunction();