Skip to content
Permalink
Browse files
2011-05-10 Yury Semikhatsky <yurys@chromium.org>
        Reviewed by Pavel Feldman.

        Web Inspector: test that browser doesn't crash if alert() arguments conversion throws to an exception
        https://bugs.webkit.org/show_bug.cgi?id=60541

        * inspector/console/alert-toString-exception-expected.txt: Added.
        * inspector/console/alert-toString-exception.html: Added.
        * platform/chromium/inspector/console/alert-toString-exception-expected.txt: Added.

Canonical link: https://commits.webkit.org/75879@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
yury-s committed May 11, 2011
1 parent 9eb4042 commit eeb3a8939c2002875a00f22a0e818cc2c49af457
@@ -1,3 +1,14 @@
2011-05-10 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: test that browser doesn't crash if alert() arguments conversion throws to an exception
https://bugs.webkit.org/show_bug.cgi?id=60541

* inspector/console/alert-toString-exception-expected.txt: Added.
* inspector/console/alert-toString-exception.html: Added.
* platform/chromium/inspector/console/alert-toString-exception-expected.txt: Added.

2011-05-10 Abhishek Arya <inferno@chromium.org>

Unreviewed.
@@ -0,0 +1,7 @@
CONSOLE MESSAGE: line 0: Exception in toString().
CONSOLE MESSAGE: line 0: Exception in toString().
Test that browser won't crash if inspector is opened for a page that fails to convert alert() argument to string. The test passes if it doesn't crash. Bug 60541

Page reloaded.
Exception in toString().

@@ -0,0 +1,25 @@
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/console-test.js"></script>
<script>
alert({toString: function() { throw "Exception in toString()."; }});
</script>
<script>
function test()
{
InspectorTest.reloadPage(function() {
InspectorTest.dumpConsoleMessages();
InspectorTest.completeTest();
});
}
</script>
</head>
<body onload="runTest()">
<p>
Test that browser won't crash if inspector is opened for a page that fails to convert
alert() argument to string. The test passes if it doesn't crash.
<a href="https://bugs.webkit.org/show_bug.cgi?id=60541">Bug 60541</a>
</p>
</body>
</html>
@@ -0,0 +1,7 @@
CONSOLE MESSAGE: line 6: Uncaught Exception in toString().
CONSOLE MESSAGE: line 6: Uncaught Exception in toString().
Test that browser won't crash if inspector is opened for a page that fails to convert alert() argument to string. The test passes if it doesn't crash. Bug 60541

Page reloaded.
alert-toString-exception.html:6Uncaught Exception in toString().

0 comments on commit eeb3a89

Please sign in to comment.