Home | History | Annotate | Download | only in manual_tests
      1 <html>
      2   <head>
      3     <title>Profiler: test profiles population on DevTools re-opening</title>
      4     <script type="text/javascript" src="resources/fib.js"></script>
      5     <script type="text/javascript">
      6       function profile_fib() {
      7         console.profile();
      8         run_fib();
      9         window.setTimeout('console.profileEnd();', 5000);
     10       }
     11     </script>
     12   </head>
     13   <body onload="profile_fib()">
     14     This test runs and profiles a simple looped computation.
     15     <br>
     16     <br>
     17     TEST
     18     <ul>
     19       <li>load file in the browser;
     20       <li>open DevTools with console (Ctrl+Shift+I on Win/Linux, Command+Option+I on Mac);
     21       <li>go to 'Profiles' page;
     22       <li>observe that 'Profile 1' item has appeared under 'CPU profiles' section;
     23       <li>reload page in browser;
     24       <li>observe that after 5 seconds, 'Profile 2' item has appeared under
     25         'CPU profiles' section;
     26       <li>take a couple of heap snapshots by pressing 'Take heap snapshot.'
     27         button (eye icon on the left of the status bar);
     28       <li>close DevTools window;
     29       <li>re-open DevTools window;
     30       <li>go to 'Profiles' page;
     31       <li>verify that CPU profiles 'Profile 1' and 'Profile 2', and heap profiles
     32         taken previously are restored back (<b>Warning:</b> it may take some
     33         time to re-process them).
     34     </ul>
     35     <br>
     36   </body>
     37 </html>
     38