OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="resources/console-clear-arguments-test.js"></script> | 3 <script src="../inspector/inspector-test.js"></script> |
| 4 <script src="../inspector/console-test.js"></script> |
4 <script> | 5 <script> |
5 | 6 |
6 if (window.testRunner) { | 7 if (window.testRunner) { |
7 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
8 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
9 } | 10 } |
10 | 11 |
11 var loadCount = 0; | 12 var loadCount = 0; |
12 function frameLoaded(event) { | 13 function frameLoaded(event) { |
13 ++loadCount; | 14 ++loadCount; |
14 if (loadCount === 1) { | 15 if (loadCount === 1) { |
15 document.getElementById('theFrame').src = "about:blank"; | 16 document.getElementById('theFrame').src = "about:blank"; |
16 return; | 17 return; |
17 } | 18 } |
18 | 19 |
19 dumpConsoleMessageCounts(); | |
20 if (window.testRunner) | 20 if (window.testRunner) |
21 testRunner.notifyDone(); | 21 testRunner.showWebInspector(); |
| 22 runTest(); |
22 } | 23 } |
23 | 24 |
| 25 function test() |
| 26 { |
| 27 for (var message of InspectorTest.mainTarget.consoleModel.messages()) { |
| 28 var args = (message.parameters || []).map((arg) => arg.type); |
| 29 InspectorTest.addResult("Message: \"" + message.messageText + "\", argum
ents: [" + args.join(", ") + "]"); |
| 30 } |
| 31 InspectorTest.completeTest(); |
| 32 } |
24 </script> | 33 </script> |
25 | 34 |
26 </head> | 35 </head> |
27 <body> | 36 <body> |
28 <p> | 37 <p> |
29 Tests that Web Inspector will discard console message arguments when iframe wher
e the message was | 38 Tests that Web Inspector will discard console message arguments and convert firs
t argument into a string when iframe where the message was |
30 logged is navigated to a different page. | 39 logged is navigated to a different page. |
31 </p> | 40 </p> |
32 <iframe id="theFrame" onload="frameLoaded(event)" src="resources/console-clear-a
rguments-iframe.html"></iframe> | 41 <iframe id="theFrame" onload="frameLoaded(event)" src="resources/console-clear-a
rguments-iframe.html"></iframe> |
33 <div id="output"></div> | 42 <div id="output"></div> |
34 </body> | 43 </body> |
35 </html> | 44 </html> |
36 | 45 |
OLD | NEW |