OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
4 <script src="../debugger-test.js"></script> | 4 <script src="../debugger-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function throwAnException() | 7 function throwAnException() |
8 { | 8 { |
9 return unknown_var; | 9 return unknown_var; |
10 } | 10 } |
11 | 11 |
12 function handleClick() | 12 function handleClick() |
13 { | 13 { |
14 throwAnException(); | 14 throwAnException(); |
15 } | 15 } |
16 | 16 |
17 var test = function() | 17 var test = function() |
18 { | 18 { |
19 InspectorTest.startDebuggerTest(step1); | 19 InspectorTest.startDebuggerTest(step1); |
20 | 20 |
21 function step1() | 21 function step1() |
22 { | 22 { |
23 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo
del.PauseOnExceptionsState.PauseOnUncaughtExceptions); | 23 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo
del.PauseOnExceptionsState.PauseOnUncaughtExceptions); |
24 InspectorTest.evaluateInPage("setTimeout(handleClick, 0)"); | 24 InspectorTest.evaluateInPage("setTimeout(handleClick, 0)"); |
25 InspectorTest.waitUntilPaused(step2); | 25 InspectorTest.waitUntilPaused(step2); |
26 } | 26 } |
27 | 27 |
28 function step2() | 28 function step2() |
29 { | 29 { |
30 var mainResourceURL = WebInspector.resourceTreeModel.mainFrame.url; | 30 var mainResourceURL = InspectorTest.resourceTreeModel.mainFrame.url; |
31 var resourceURL = WebInspector.ParsedURL.completeURL(mainResourceURL, "r
esources/resource.php"); | 31 var resourceURL = WebInspector.ParsedURL.completeURL(mainResourceURL, "r
esources/resource.php"); |
32 InspectorTest.NetworkAgent.loadResourceForFrontend(WebInspector.resource
TreeModel.mainFrame.id, resourceURL, undefined, resourceContentLoaded); | 32 InspectorTest.NetworkAgent.loadResourceForFrontend(InspectorTest.resourc
eTreeModel.mainFrame.id, resourceURL, undefined, resourceContentLoaded); |
33 } | 33 } |
34 | 34 |
35 function resourceContentLoaded(error, statusCode, headers, content) | 35 function resourceContentLoaded(error, statusCode, headers, content) |
36 { | 36 { |
37 InspectorTest.assertTrue(!error, "There shouldn't have been an error on
resource load: " + error); | 37 InspectorTest.assertTrue(!error, "There shouldn't have been an error on
resource load: " + error); |
38 InspectorTest.addResult("Resource content loaded: " + content); | 38 InspectorTest.addResult("Resource content loaded: " + content); |
39 InspectorTest.completeDebuggerTest(); | 39 InspectorTest.completeDebuggerTest(); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 </script> | 43 </script> |
44 </head> | 44 </head> |
45 | 45 |
46 <body onload="runTest()"> | 46 <body onload="runTest()"> |
47 <p> | 47 <p> |
48 Tests that loading external resources works when inspected page is paused. | 48 Tests that loading external resources works when inspected page is paused. |
49 </p> | 49 </p> |
50 | 50 |
51 </body> | 51 </body> |
52 </html> | 52 </html> |
OLD | NEW |