Diff
Modified: trunk/LayoutTests/ChangeLog (107305 => 107306)
--- trunk/LayoutTests/ChangeLog 2012-02-10 00:31:12 UTC (rev 107305)
+++ trunk/LayoutTests/ChangeLog 2012-02-10 00:35:43 UTC (rev 107306)
@@ -1,3 +1,22 @@
+2012-02-09 Adam Klein <[email protected]>
+
+ Split one MutationObserver layout test into two
+ https://bugs.webkit.org/show_bug.cgi?id=78285
+
+ Reviewed by Ojan Vafai.
+
+ Rather than a single non-event-delivery.html test,
+ created seperate tests for SQL database and FileSystem,
+ making it easy to skip them separately if the underlying
+ feature isn't supported by a particular platform.
+
+ * fast/mutation/database-callback-delivery-expected.txt: Added.
+ * fast/mutation/database-callback-delivery.html: Added.
+ * fast/mutation/filesystem-callback-delivery-expected.txt: Added.
+ * fast/mutation/filesystem-callback-delivery.html: Added.
+ * fast/mutation/non-event-delivery-expected.txt: Removed.
+ * fast/mutation/non-event-delivery.html: Removed.
+
2012-02-09 Matthew Delaney <[email protected]>
getComputedStyle() returns different values for different zoom levels
Added: trunk/LayoutTests/fast/mutation/database-callback-delivery-expected.txt (0 => 107306)
--- trunk/LayoutTests/fast/mutation/database-callback-delivery-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/mutation/database-callback-delivery-expected.txt 2012-02-10 00:35:43 UTC (rev 107306)
@@ -0,0 +1,13 @@
+Testing mutations are delivered following Database transaction callbacks.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mutations.length is 1
+PASS mutations[0].type is "attributes"
+PASS mutations[0].attributeName is "foo"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/fast/mutation/database-callback-delivery-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/fast/mutation/database-callback-delivery.html (0 => 107306)
--- trunk/LayoutTests/fast/mutation/database-callback-delivery.html (rev 0)
+++ trunk/LayoutTests/fast/mutation/database-callback-delivery.html 2012-02-10 00:35:43 UTC (rev 107306)
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<script src=""
+<script>
+window.jsTestIsAsync = true;
+var mutations;
+
+function testDatabase() {
+ var div;
+ var db;
+ var observer;
+
+ function start() {
+ mutations = null;
+ div = document.createElement('div');
+ observer = new WebKitMutationObserver(function(m) {
+ mutations = m;
+ });
+
+ observer.observe(div, { attributes: true, characterData: true });
+
+ db = openDatabase('DatabaseMutationDelivery', '1.0', '', 1);
+ db.transaction(mutate);
+ }
+
+ function mutate() {
+ div.setAttribute('foo', 'bar');
+ setTimeout(finish, 0);
+ }
+
+ function finish() {
+ shouldBe('mutations.length', '1');
+ shouldBe('mutations[0].type', '"attributes"');
+ shouldBe('mutations[0].attributeName', '"foo"');
+ observer.disconnect();
+ debug('');
+ finishJSTest();
+ }
+
+ start();
+}
+
+description('Testing mutations are delivered following Database transaction callbacks.');
+
+if (!window.WebKitMutationObserver) {
+ testFailed('This test requires ENABLE(MUTATION_OBSERVERS)');
+ finishJSTest();
+} else
+ testDatabase();
+</script>
+<script src=""
Property changes on: trunk/LayoutTests/fast/mutation/database-callback-delivery.html
___________________________________________________________________
Added: svn:eol-style
Copied: trunk/LayoutTests/fast/mutation/filesystem-callback-delivery-expected.txt (from rev 107304, trunk/LayoutTests/fast/mutation/non-event-delivery-expected.txt) (0 => 107306)
--- trunk/LayoutTests/fast/mutation/filesystem-callback-delivery-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/mutation/filesystem-callback-delivery-expected.txt 2012-02-10 00:35:43 UTC (rev 107306)
@@ -0,0 +1,16 @@
+Test that Mutation Records are delivered following FileSystem callbacks.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mutations.length is 1
+PASS mutations[0].type is "attributes"
+PASS mutations[0].attributeName is "foo"
+PASS mutations.length is 1
+PASS mutations[0].type is "attributes"
+PASS mutations[0].attributeName is "baz"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes: trunk/LayoutTests/fast/mutation/filesystem-callback-delivery-expected.txt
Added: svn:eol-style
Copied: trunk/LayoutTests/fast/mutation/filesystem-callback-delivery.html (from rev 107304, trunk/LayoutTests/fast/mutation/non-event-delivery.html) (0 => 107306)
--- trunk/LayoutTests/fast/mutation/filesystem-callback-delivery.html (rev 0)
+++ trunk/LayoutTests/fast/mutation/filesystem-callback-delivery.html 2012-02-10 00:35:43 UTC (rev 107306)
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<script src=""
+<script>
+window.jsTestIsAsync = true;
+var mutations;
+
+function testFilesystem() {
+ var div;
+ var fileEntry;
+ var observer;
+
+ function start() {
+ mutations = null;
+ div = document.createElement('div');
+ observer = new WebKitMutationObserver(function(m) {
+ mutations = m;
+ });
+
+ observer.observe(div, { attributes: true, characterData: true });
+
+ webkitRequestFileSystem(TEMPORARY, 5*1024*1024, function(fs) {
+ fs.root.getFile('foo.txt', {create: true, excluse: true}, function(entry) {
+ fileEntry = entry;
+ fileEntry.getParent(mutateAfterGetParent);
+ });
+ });
+ }
+
+ function mutateAfterGetParent() {
+ div.setAttribute('foo', 'bar');
+ fileEntry.remove(mutateAfterRemove);
+ }
+
+ function mutateAfterRemove() {
+ shouldBe('mutations.length', '1');
+ shouldBe('mutations[0].type', '"attributes"');
+ shouldBe('mutations[0].attributeName', '"foo"');
+
+ mutations = null;
+ div.setAttribute('baz', 'bat');
+ setTimeout(finish, 0);
+ }
+
+ function finish() {
+ shouldBe('mutations.length', '1');
+ shouldBe('mutations[0].type', '"attributes"');
+ shouldBe('mutations[0].attributeName', '"baz"');
+
+ observer.disconnect();
+ debug('');
+ finishJSTest();
+ }
+
+ start();
+}
+
+description('Test that Mutation Records are delivered following FileSystem callbacks.');
+
+if (!window.WebKitMutationObserver || !window.webkitRequestFileSystem) {
+ testFailed('This test requires ENABLE(MUTATION_OBSERVERS) and ENABLE(FILE_SYSTEM)');
+ finishJSTest();
+} else
+ testFilesystem();
+</script>
+<script src=""
Property changes: trunk/LayoutTests/fast/mutation/filesystem-callback-delivery.html
Added: svn:eol-style
Deleted: trunk/LayoutTests/fast/mutation/non-event-delivery-expected.txt (107305 => 107306)
--- trunk/LayoutTests/fast/mutation/non-event-delivery-expected.txt 2012-02-10 00:31:12 UTC (rev 107305)
+++ trunk/LayoutTests/fast/mutation/non-event-delivery-expected.txt 2012-02-10 00:35:43 UTC (rev 107306)
@@ -1,22 +0,0 @@
-Test that Mutation Records are delivered following non-event async callbacks.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Testing mutations are delivered following Database transaction callbacks.
-PASS mutations.length is 1
-PASS mutations[0].type is "attributes"
-PASS mutations[0].attributeName is "foo"
-
-Testing mutations are delivered following Filesystem callbacks.
-PASS mutations.length is 1
-PASS mutations[0].type is "attributes"
-PASS mutations[0].attributeName is "foo"
-PASS mutations.length is 1
-PASS mutations[0].type is "attributes"
-PASS mutations[0].attributeName is "baz"
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/mutation/non-event-delivery.html (107305 => 107306)
--- trunk/LayoutTests/fast/mutation/non-event-delivery.html 2012-02-10 00:31:12 UTC (rev 107305)
+++ trunk/LayoutTests/fast/mutation/non-event-delivery.html 2012-02-10 00:35:43 UTC (rev 107306)
@@ -1,131 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<script src=""
-</head>
-<body>
-<p id=description></p>
-<div id="console"></div>
-<script>
-
-window.jsTestIsAsync = true;
-var mutations;
-
-function testDatabase() {
- var div;
- var db;
- var observer;
-
- function start() {
- debug('Testing mutations are delivered following Database transaction callbacks.');
-
- mutations = null;
- div = document.createElement('div');
- observer = new WebKitMutationObserver(function(m) {
- mutations = m;
- });
-
- observer.observe(div, { attributes: true, characterData: true });
-
- db = openDatabase('DatabaseMutationDelivery', '1.0', '', 1);
- db.transaction(mutate);
- }
-
- function mutate() {
- div.setAttribute('foo', 'bar');
- setTimeout(finish, 0);
- }
-
- function finish() {
- shouldBe('mutations.length', '1');
- shouldBe('mutations[0].type', '"attributes"');
- shouldBe('mutations[0].attributeName', '"foo"');
- observer.disconnect();
- debug('');
- runNextTest();
- }
-
- start();
-}
-
-function testFilesystem() {
- var div;
- var fileEntry;
- var observer;
-
- function start() {
- debug('Testing mutations are delivered following Filesystem callbacks.');
-
- mutations = null;
- div = document.createElement('div');
- observer = new WebKitMutationObserver(function(m) {
- mutations = m;
- });
-
- observer.observe(div, { attributes: true, characterData: true });
-
- webkitRequestFileSystem(TEMPORARY, 5*1024*1024, function(fs) {
- fs.root.getFile('foo.txt', {create: true, excluse: true}, function(entry) {
- fileEntry = entry;
- fileEntry.getParent(mutateAfterGetParent);
- });
- });
- }
-
- function mutateAfterGetParent() {
- div.setAttribute('foo', 'bar');
- fileEntry.remove(mutateAfterRemove);
- }
-
- function mutateAfterRemove() {
- shouldBe('mutations.length', '1');
- shouldBe('mutations[0].type', '"attributes"');
- shouldBe('mutations[0].attributeName', '"foo"');
-
- mutations = null;
- div.setAttribute('baz', 'bat');
- setTimeout(finish, 0);
- }
-
- function finish() {
- shouldBe('mutations.length', '1');
- shouldBe('mutations[0].type', '"attributes"');
- shouldBe('mutations[0].attributeName', '"baz"');
-
- observer.disconnect();
- debug('');
- runNextTest();
- }
-
- start();
-}
-
-var tests = [
- testDatabase,
- testFilesystem
-];
-var testIndex = 0;
-
-function runNextTest() {
- if (testIndex < tests.length)
- tests[testIndex++]();
- else
- finishJSTest();
-}
-
-description('Test that Mutation Records are delivered following non-event async callbacks.');
-
-if (!window.WebKitMutationObserver) {
- testFailed('This test requires ENABLE(MUTATION_OBSERVERS)');
- finishJSTest();
-} else if (!window.webkitRequestFileSystem) {
- testFailed('This test requires ENABLE(FILE_SYSTEM)');
- finishJSTest();
-} else
- runNextTest();
-
-</script>
-<script src=""
-</body>
-</html>