2008-12-09 David Levin <levin@chromium.org>
authorpam@chromium.org <pam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2008 01:35:03 +0000 (01:35 +0000)
committerpam@chromium.org <pam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2008 01:35:03 +0000 (01:35 +0000)
        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=22512

        Add a test to check for checks when attaching an event to a document created by
        'document.implementation.createDocument'.

        * fast/events/create-document-crash-on-attach-event-expected.txt: Added.
        * fast/events/create-document-crash-on-attach-event.html: Added.
        * fast/events/resources/create-document-crash-on-attach-event.js: Added.
        (doc.onload):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39159 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/events/create-document-crash-on-attach-event-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/create-document-crash-on-attach-event.html [new file with mode: 0644]
LayoutTests/fast/events/resources/create-document-crash-on-attach-event.js [new file with mode: 0644]

index cb463df3ef454faac7417569fdd3b35dbe22a103..1e5ec755211af89a94b72ff2b86a34c7bacad4b3 100644 (file)
@@ -1,3 +1,17 @@
+2008-12-09  David Levin  <levin@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        https://bugs.webkit.org/show_bug.cgi?id=22512
+
+        Add a test to check for checks when attaching an event to a document created by
+        'document.implementation.createDocument'.
+
+        * fast/events/create-document-crash-on-attach-event-expected.txt: Added.
+        * fast/events/create-document-crash-on-attach-event.html: Added.
+        * fast/events/resources/create-document-crash-on-attach-event.js: Added.
+        (doc.onload):
+
 2008-12-09  David Levin  <levin@chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/fast/events/create-document-crash-on-attach-event-expected.txt b/LayoutTests/fast/events/create-document-crash-on-attach-event-expected.txt
new file mode 100644 (file)
index 0000000..8e4cb05
--- /dev/null
@@ -0,0 +1,10 @@
+This test checks for crashes in setting an event handler on a document element created by document.implementation.createDocument.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS Attached onload event handler to created document.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/events/create-document-crash-on-attach-event.html b/LayoutTests/fast/events/create-document-crash-on-attach-event.html
new file mode 100644 (file)
index 0000000..f9a7a11
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/create-document-crash-on-attach-event.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/events/resources/create-document-crash-on-attach-event.js b/LayoutTests/fast/events/resources/create-document-crash-on-attach-event.js
new file mode 100644 (file)
index 0000000..14ac0ed
--- /dev/null
@@ -0,0 +1,8 @@
+description('This test checks for crashes in setting an event handler on a document element created by '
+            + 'document.implementation.createDocument.');
+
+var doc = document.implementation.createDocument('', '', null);
+doc.onload = function() { };
+testPassed('Attached onload event handler to created document.');
+
+var successfullyParsed = true;