summaryrefslogtreecommitdiffstats
path: root/LayoutTests
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-06-02 12:07:03 +0100
committerBen Murdoch <benm@google.com>2011-06-10 10:47:21 +0100
commit2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch)
treee4964fbd1cb70599f7718ff03e50ea1dab33890b /LayoutTests
parent87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff)
downloadexternal_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'LayoutTests')
-rw-r--r--LayoutTests/fast/dom/DOMImplementation/implementation-identity-expected.txt7
-rw-r--r--LayoutTests/fast/dom/DOMImplementation/implementation-identity.html30
-rw-r--r--LayoutTests/fast/dom/Geolocation/argument-types-expected.txt4
-rw-r--r--LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js6
-rw-r--r--LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1-expected.txt4
-rw-r--r--LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html18
-rw-r--r--LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2-expected.txt4
-rw-r--r--LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2.html17
-rw-r--r--LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt11
-rw-r--r--LayoutTests/fast/dom/HTMLKeygenElement/keygen.html26
-rw-r--r--LayoutTests/fast/dom/HTMLLinkElement/subresource-expected.txt3
-rw-r--r--LayoutTests/fast/dom/HTMLLinkElement/subresource.html20
-rwxr-xr-xLayoutTests/http/tests/resources/slow-script.pl23
-rw-r--r--LayoutTests/storage/script-tests/TEMPLATE.html13
-rw-r--r--LayoutTests/storage/script-tests/storageinfo-query-usage.js31
-rw-r--r--LayoutTests/storage/storageinfo-query-usage-expected.txt11
-rw-r--r--LayoutTests/storage/storageinfo-query-usage.html13
17 files changed, 222 insertions, 19 deletions
diff --git a/LayoutTests/fast/dom/DOMImplementation/implementation-identity-expected.txt b/LayoutTests/fast/dom/DOMImplementation/implementation-identity-expected.txt
new file mode 100644
index 0000000..42bdffd
--- /dev/null
+++ b/LayoutTests/fast/dom/DOMImplementation/implementation-identity-expected.txt
@@ -0,0 +1,7 @@
+This test checks that DOMImplementation object is created per document.
+
+If the test passes, you should see a few OK lines below.
+
+OK: Top-level document and iframe document have different DOMImplementation objects
+OK: DOMImplementation object is cached
+
diff --git a/LayoutTests/fast/dom/DOMImplementation/implementation-identity.html b/LayoutTests/fast/dom/DOMImplementation/implementation-identity.html
new file mode 100644
index 0000000..2b3c56c
--- /dev/null
+++ b/LayoutTests/fast/dom/DOMImplementation/implementation-identity.html
@@ -0,0 +1,30 @@
+<body>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+function print(message)
+{
+ var paragraph = document.createElement("li");
+ paragraph.appendChild(document.createTextNode(message));
+ document.getElementById("console").appendChild(paragraph);
+}
+
+function test()
+{
+ if (document.implementation != frames[0].document.implementation)
+ print("OK: Top-level document and iframe document have different DOMImplementation objects");
+ else
+ print("BUG: Top-level document and iframe document share a DOMImplementation object");
+
+ if (document.implementation === document.implementation)
+ print("OK: DOMImplementation object is cached");
+ else
+ print("BUG: DOMImplementation object is not cached");
+}
+</script>
+<p>This test checks that DOMImplementation object is created per document.</p>
+<p>If the test passes, you should see a few OK lines below.</p>
+<p><ol id=console></ol></p>
+<iframe src="about:blank" onload="test()"></iframe>
+</body>
diff --git a/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt b/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt
index 23ea685..6c25000 100644
--- a/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt
+++ b/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt
@@ -9,6 +9,8 @@ PASS navigator.geolocation.getCurrentPosition(null) threw exception Error: TYPE_
PASS navigator.geolocation.getCurrentPosition({}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(Math.abs) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(layoutTestController.setGeolocationPermission) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
@@ -19,6 +21,8 @@ PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) did not throw
PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, layoutTestController.setGeolocationPermission) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, 42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js b/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js
index 01c77f5..73ffb41 100644
--- a/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js
+++ b/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js
@@ -40,7 +40,8 @@ test('navigator.geolocation.getCurrentPosition(null)', true);
test('navigator.geolocation.getCurrentPosition({})', true);
test('navigator.geolocation.getCurrentPosition(objectThrowingException)', true);
test('navigator.geolocation.getCurrentPosition(emptyFunction)', false);
-//test('navigator.geolocation.getCurrentPosition(Math.abs)', false);
+test('navigator.geolocation.getCurrentPosition(Math.abs)', false);
+test('navigator.geolocation.getCurrentPosition(layoutTestController.setGeolocationPermission)', false);
test('navigator.geolocation.getCurrentPosition(true)', true);
test('navigator.geolocation.getCurrentPosition(42)', true);
test('navigator.geolocation.getCurrentPosition(Infinity)', true);
@@ -52,7 +53,8 @@ test('navigator.geolocation.getCurrentPosition(emptyFunction, null)', false);
test('navigator.geolocation.getCurrentPosition(emptyFunction, {})', true);
test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true);
test('navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction)', false);
-//test('navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs)', false);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs)', false);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, layoutTestController.setGeolocationPermission)', false);
test('navigator.geolocation.getCurrentPosition(emptyFunction, true)', true);
test('navigator.geolocation.getCurrentPosition(emptyFunction, 42)', true);
test('navigator.geolocation.getCurrentPosition(emptyFunction, Infinity)', true);
diff --git a/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1-expected.txt
new file mode 100644
index 0000000..02d7cb5
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1-expected.txt
@@ -0,0 +1,4 @@
+This page verifies fix for bug 58247. WebKit should not crash when this page is rendered.
+
+
+PASS
diff --git a/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html b/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html
new file mode 100644
index 0000000..c9d7fe3
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html
@@ -0,0 +1,18 @@
+<head>
+ <script>
+ function pass() {
+ var div = document.createElement('div');
+ div.innerHTML = 'PASS';
+ document.body.appendChild(div);
+ }
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ </script>
+</head>
+<body onload="pass()">
+<p>This page verifies fix for bug 58247. WebKit should not crash when this page is rendered.</p>
+
+<a </var><form><button form="f"><progress>
+<keygen form="f"><a </datalist><button>
+</body>
+
diff --git a/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2-expected.txt
new file mode 100644
index 0000000..02d7cb5
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2-expected.txt
@@ -0,0 +1,4 @@
+This page verifies fix for bug 58247. WebKit should not crash when this page is rendered.
+
+
+PASS
diff --git a/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2.html b/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2.html
new file mode 100644
index 0000000..5f68010
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2.html
@@ -0,0 +1,17 @@
+<head>
+ <script>
+ function pass() {
+ var div = document.createElement('div');
+ div.innerHTML = 'PASS';
+ document.body.appendChild(div);
+ }
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ </script>
+</head>
+<body onload="pass()">
+<p>This page verifies fix for bug 58247. WebKit should not crash when this page is rendered.</p>
+
+<form><em><ol </del><fieldset form="f"</sub><option </dt><button form="f"></em><meter </time>
+</body>
+
diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt
index 4d7e1f0..017eeac 100644
--- a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt
+++ b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt
@@ -1,8 +1,11 @@
-Tests the keygen element.
+This tests the keygen element.
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS keygen.options is undefined
+PASS shadow.firstChild.tagName is "SELECT"
+PASS layoutTestController.shadowRoot(shadow) is null
+PASS layoutTestController.shadowRoot(shadow.firstChild) is null
+PASS successfullyParsed is true
-
-PASS document.getElementById("keys").options is undefined
+TEST COMPLETE
diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html b/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html
index 59196ac..a9c5c74 100644
--- a/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html
+++ b/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html
@@ -1,27 +1,27 @@
+<!DOCTYPE html>
<html>
<head>
-<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>
<keygen id="keys" />
+<pre id="console">
+This tests the keygen element.
-<p id="description"></p>
-<div id="console"></div>
-
+</pre>
<script>
-if (window.layoutTestController)
- layoutTestController.dumpAsText();
-
-function test(elementId)
-{
- description('Tests the keygen element.');
+var keygen = document.getElementById('keys');
+shouldBe('keygen.options', 'undefined'); // keygen is not a select
- shouldBe('document.getElementById("keys").options', 'undefined');
+if (window.layoutTestController) {
+ var shadow = layoutTestController.shadowRoot(keygen);
+ shouldBe('shadow.firstChild.tagName', '"SELECT"');
+ shouldBe('layoutTestController.shadowRoot(shadow)', 'null');
+ shouldBe('layoutTestController.shadowRoot(shadow.firstChild)', 'null');
}
-test("keys");
+var successfullyParsed = true;
</script>
-
+<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>
diff --git a/LayoutTests/fast/dom/HTMLLinkElement/subresource-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/subresource-expected.txt
new file mode 100644
index 0000000..b65bfe2
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLLinkElement/subresource-expected.txt
@@ -0,0 +1,3 @@
+prefetch.link has MIME type application/octet-stream
+PASS onload called!
+This test will only print "PASS" or "FAIL" if link prefetches are enabled, otherwise it will show nothing below.
diff --git a/LayoutTests/fast/dom/HTMLLinkElement/subresource.html b/LayoutTests/fast/dom/HTMLLinkElement/subresource.html
new file mode 100644
index 0000000..0477e03
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLLinkElement/subresource.html
@@ -0,0 +1,20 @@
+<body>
+<div id="console"></div>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script>
+function prefetch_onload() {
+ testPassed('onload called!');
+ layoutTestController.notifyDone();
+}
+if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpResourceResponseMIMETypes();
+}
+</script>
+<html>
+<p>This test will only print "PASS" or "FAIL" if link prefetches are
+enabled, otherwise it will show nothing below.</p>
+<link href="prefetch.link" rel="prefetch" onload="prefetch_onload()" onerror="testFailed('onerror')" />
+</html>
+
diff --git a/LayoutTests/http/tests/resources/slow-script.pl b/LayoutTests/http/tests/resources/slow-script.pl
new file mode 100755
index 0000000..3accf91
--- /dev/null
+++ b/LayoutTests/http/tests/resources/slow-script.pl
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -w
+
+use strict;
+use CGI;
+use Time::HiRes qw(sleep);
+
+my $cgi = new CGI;
+my $delay = $cgi->param('delay');
+$delay = 5000 unless $delay;
+
+# flush the buffers after each print
+select (STDOUT);
+$| = 1;
+
+print "Content-Type: application/javascript\n";
+print "Expires: Thu, 01 Dec 2003 16:00:00 GMT\n";
+print "Cache-Control: no-store, no-cache, must-revalidate\n";
+print "Pragma: no-cache\n";
+print "\n";
+
+sleep $delay / 1000;
+
+
diff --git a/LayoutTests/storage/script-tests/TEMPLATE.html b/LayoutTests/storage/script-tests/TEMPLATE.html
new file mode 100644
index 0000000..eb1d038
--- /dev/null
+++ b/LayoutTests/storage/script-tests/TEMPLATE.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
+<script src="../fast/js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/script-tests/storageinfo-query-usage.js b/LayoutTests/storage/script-tests/storageinfo-query-usage.js
new file mode 100644
index 0000000..8af9232
--- /dev/null
+++ b/LayoutTests/storage/script-tests/storageinfo-query-usage.js
@@ -0,0 +1,31 @@
+description("This tests webkitStorageInfo API works.");
+
+function errorCallback(error)
+{
+ testFailed("Error occurred: " + error);
+ finishJSTest();
+}
+
+var returnedUsage;
+var returnedQuota;
+function usageCallback(usage, quota)
+{
+ returnedUsage = usage;
+ returnedQuota = quota;
+
+ // Usage should be 0 (if other storage tests have correctly cleaned up their test data before exiting).
+ shouldBe("returnedUsage", "0");
+
+ // Quota value would vary depending on the test environment.
+ shouldBeGreaterThanOrEqual("returnedQuota", "returnedUsage");
+
+ finishJSTest();
+}
+
+if (window.webkitStorageInfo) {
+ window.jsTestIsAsync = true;
+ webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.TEMPORARY, usageCallback, errorCallback);
+} else
+ debug("This test requires window.webkitStorageInfo.");
+
+window.successfullyParsed = true;
diff --git a/LayoutTests/storage/storageinfo-query-usage-expected.txt b/LayoutTests/storage/storageinfo-query-usage-expected.txt
new file mode 100644
index 0000000..50ef9e6
--- /dev/null
+++ b/LayoutTests/storage/storageinfo-query-usage-expected.txt
@@ -0,0 +1,11 @@
+This tests webkitStorageInfo API works.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS returnedUsage is 0
+PASS returnedQuota is >= returnedUsage
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/storageinfo-query-usage.html b/LayoutTests/storage/storageinfo-query-usage.html
new file mode 100644
index 0000000..6e41d42
--- /dev/null
+++ b/LayoutTests/storage/storageinfo-query-usage.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
+<script src="../fast/js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/storageinfo-query-usage.js"></script>
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>