diff options
author | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 10:13:10 +0000 |
---|---|---|
committer | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 10:13:10 +0000 |
commit | d5a7cedcb79a5c31f37ffce5d30b1d6bd40623dc (patch) | |
tree | 873120e0ddd02be2e6d6ec7e0678a3e4169d9d1f /chrome/browser | |
parent | 26a6fae0c806a9f2afb41ac7a9064924db03badc (diff) | |
download | chromium_src-d5a7cedcb79a5c31f37ffce5d30b1d6bd40623dc.zip chromium_src-d5a7cedcb79a5c31f37ffce5d30b1d6bd40623dc.tar.gz chromium_src-d5a7cedcb79a5c31f37ffce5d30b1d6bd40623dc.tar.bz2 |
DevTools: add more manual Profiles tab tests.
Review URL: http://codereview.chromium.org/404002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
4 files changed, 179 insertions, 0 deletions
diff --git a/chrome/browser/debugger/manual_tests/heap-profiler-test-basic-grid-functionality.html b/chrome/browser/debugger/manual_tests/heap-profiler-test-basic-grid-functionality.html new file mode 100644 index 0000000..5aa4555 --- /dev/null +++ b/chrome/browser/debugger/manual_tests/heap-profiler-test-basic-grid-functionality.html @@ -0,0 +1,32 @@ +<html> + <head> + <title>Heap Profiler: basic grid functionality test</title> + </head> + <body> + This is the test for basic functionality of heap snapshot view grid. + <br> + <br> + To use this test: + <ul> + <li>load file in the browser; + <li>open DevTools (Ctrl+Shift+I on Win/Linux, Command+Option+I on Mac); + <li>go to 'Profiles' page; + <li>press 'Take heap snapshot' button + (eye icon on the left side of status bar); + </ul> + <br> + On the left pane under 'Heap snapshots' section, an item called + 'Snapshot 1' must appear, and a grid with snapshot data must + appear on the right. Now test the following functionality in the grid: + <ul> + <li>change sorting order in each column by clicking on its header; + <li>resize each column; + <li>toggle between showing absolute times and percents + (button with percent sign on the status bar); + <li>double-click on numbers in 'Count' and + 'Size' columns to toggle between times and percents for + this column only; + <li>expanding and collapsing tree nodes. + </ul> + </body> +</html> diff --git a/chrome/browser/debugger/manual_tests/heap-profiler-test-snapshots-comparison.html b/chrome/browser/debugger/manual_tests/heap-profiler-test-snapshots-comparison.html new file mode 100644 index 0000000..3a419d4e --- /dev/null +++ b/chrome/browser/debugger/manual_tests/heap-profiler-test-snapshots-comparison.html @@ -0,0 +1,83 @@ +<html> + <head> + <title>Heap Profiler: heap snapshots comparison test</title> + <script type="text/javascript"> + var aHolder = [], bHolder = [], cHolder = [], dHolder = []; + + function A(x) { + this.x = x; + } + + function B(x) { + this.x = x; + } + + function C() {} + + var i; + for (i = 0; i < 100; ++i) { + var b = new B('hello'); + bHolder.push(b); + aHolder.push(new A(b)); + b = null; + } + for (i = 0; i < 25; ++i) { + cHolder.push(new C()); + } + + function D() {} + + function changeStuff() { + if (aHolder.length > 0) { + aHolder.splice(aHolder.length - 25, 25); + } + for (i = 0; i < 25; ++i) { + bHolder.push(new B('hello')); + } + cHolder = []; + for (i = 0; i < 25; ++i) { + dHolder.push(new D()); + } + } + </script> + </head> + <body> + This is the test for heap snapshot comparison functionality. + <br> + <br> + To use this test: + <ul> + <li>load file in the browser; + <li>open DevTools (Ctrl+Shift+I on Win/Linux, Command+Option+I on Mac); + <li>go to 'Profiles' page; + <li>press 'Take heap snapshot' button + (eye icon on the left side of the status bar); + <li>press + <input type="button" name="changeStuff" value="this button" onclick="changeStuff()" />; + <li>press 'Take heap snapshot' button again; + </ul> + <br> + On the left pane under 'Heap snapshots' section, items called + 'Snapshot 1' and 'Snapshot 2' must appear. Select 'Snapshot 2'. + Ensure that absolute values are shown (not percents). + <br> + <br> + TEST 1. Verify the following: + <ul> + <li>the value in '+/- Count' column for 'A' must be '-25'; + <li>after expanding 'A' item, the value in '+/- Count' column + for 'Array' child entry must also be '-25'; + <li>the value in '+/- Count' column for 'B' must be '+25'; + <li>after expanding 'B' item, the value in '+/- Count' column + for 'Array' child entry must also be '+25'; the value for 'A' + child must be '-25'; + </ul> + <br> + TEST 2. Change display to percent view (using the percent button on the + status bar). Verify the following: + <ul> + <li>values in '+/- Count' and '+/- Size' columns for 'C' must be 'deleted'; + <li>values in '+/- Count' and '+/- Size' columns for 'D' must be 'new'; + </ul> + </body> +</html> diff --git a/chrome/browser/debugger/manual_tests/profiler-test-console-control.html b/chrome/browser/debugger/manual_tests/profiler-test-console-control.html new file mode 100644 index 0000000..4f2001a --- /dev/null +++ b/chrome/browser/debugger/manual_tests/profiler-test-console-control.html @@ -0,0 +1,27 @@ +<html> + <head> + <title>Profiler: test console controlling of CPU profiling</title> + <script type="text/javascript" src="resources/fib.js"></script> + <script type="text/javascript"> + function profile_fib() { + console.profile(); + run_fib(); + window.setTimeout('console.profileEnd();', 5000); + } + </script> + </head> + <body onload="profile_fib()"> + This test runs and profiles a simple looped computation. + <br> + <br> + TEST + <ul> + <li>load file in the browser; + <li>open DevTools with console (Ctrl+Shift+I on Win/Linux, Command+Option+I on Mac); + <li>go to 'Profiles' page; + <li>observe that 'Profile 1' item has appeared under 'CPU profiles' section; + <li>check for presence of 'eternal_fib' entry in the profile view. + </ul> + <br> + </body> +</html> diff --git a/chrome/browser/debugger/manual_tests/profiler-test-re-opening.html b/chrome/browser/debugger/manual_tests/profiler-test-re-opening.html new file mode 100644 index 0000000..a615afa --- /dev/null +++ b/chrome/browser/debugger/manual_tests/profiler-test-re-opening.html @@ -0,0 +1,37 @@ +<html> + <head> + <title>Profiler: test profiles population on DevTools re-opening</title> + <script type="text/javascript" src="resources/fib.js"></script> + <script type="text/javascript"> + function profile_fib() { + console.profile(); + run_fib(); + window.setTimeout('console.profileEnd();', 5000); + } + </script> + </head> + <body onload="profile_fib()"> + This test runs and profiles a simple looped computation. + <br> + <br> + TEST + <ul> + <li>load file in the browser; + <li>open DevTools with console (Ctrl+Shift+I on Win/Linux, Command+Option+I on Mac); + <li>go to 'Profiles' page; + <li>observe that 'Profile 1' item has appeared under 'CPU profiles' section; + <li>reload page in browser; + <li>observe that after 5 seconds, 'Profile 2' item has appeared under + 'CPU profiles' section; + <li>take a couple of heap snapshots by pressing 'Take heap snapshot.' + button (eye icon on the left of the status bar); + <li>close DevTools window; + <li>re-open DevTools window; + <li>go to 'Profiles' page; + <li>verify that CPU profiles 'Profile 1' and 'Profile 2', and heap profiles + taken previously are restored back (<b>Warning:</b> it may take some + time to re-process them). + </ul> + <br> + </body> +</html> |