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