| <html> |
| <head> |
| <script src="../inspector/inspector-test.js"></script> |
| <script src="../inspector/console-test.js"></script> |
| <script> |
| if (window.testRunner) { |
| testRunner.waitUntilDone(); |
| testRunner.dumpAsText(); |
| } |
| |
| function removeIFrame() |
| { |
| var container = document.getElementById('container'); |
| var child = container.firstChild; |
| while (child) { |
| container.removeChild(child); |
| child = container.firstChild; |
| } |
| if (window.testRunner) |
| testRunner.showWebInspector(); |
| runTest(); |
| } |
| |
| function createIFrame() |
| { |
| var iframe = document.createElement('iframe'); |
| iframe.setAttribute('src', 'resources/console-clear-arguments-iframe.html'); |
| iframe.onload= removeIFrame; |
| document.getElementById('container').appendChild(iframe); |
| } |
| |
| function test() |
| { |
| for (var message of InspectorTest.mainTarget.consoleModel.messages()) { |
| var args = (message.parameters || []).map((arg) => arg.type); |
| InspectorTest.addResult("Message: \"" + message.messageText + "\", arguments: [" + args.join(", ") + "]"); |
| } |
| InspectorTest.completeTest(); |
| } |
| </script> |
| </head> |
| <body onload="createIFrame()"> |
| <p> |
| Tests that console message arguments will be cleared and first argument will be converted into a string when iframe where the messages were |
| created is removed. |
| </p> |
| <div id="container"></div> |
| <div id="output"></div> |
| </body> |
| </html> |