Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / MutationObserver / filesystem-callback-delivery.html
blobf8addc2376c9b4550c5fde084d9aa0b45ff4ade6
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script>
4 window.jsTestIsAsync = true;
5 var mutations;
7 function testFilesystem() {
8 var div;
9 var fileEntry;
10 var observer;
12 function start() {
13 mutations = null;
14 div = document.createElement('div');
15 observer = new MutationObserver(function(m) {
16 mutations = m;
17 });
19 observer.observe(div, { attributes: true, characterData: true });
21 webkitRequestFileSystem(TEMPORARY, 5*1024*1024, function(fs) {
22 fs.root.getFile('foo.txt', {create: true, excluse: true}, function(entry) {
23 fileEntry = entry;
24 fileEntry.getParent(mutateAfterGetParent);
25 });
26 });
29 function mutateAfterGetParent() {
30 div.setAttribute('foo', 'bar');
31 fileEntry.remove(mutateAfterRemove);
34 function mutateAfterRemove() {
35 shouldBe('mutations.length', '1');
36 shouldBe('mutations[0].type', '"attributes"');
37 shouldBe('mutations[0].attributeName', '"foo"');
39 mutations = null;
40 div.setAttribute('baz', 'bat');
41 setTimeout(finish, 0);
44 function finish() {
45 shouldBe('mutations.length', '1');
46 shouldBe('mutations[0].type', '"attributes"');
47 shouldBe('mutations[0].attributeName', '"baz"');
49 observer.disconnect();
50 debug('');
51 finishJSTest();
54 start();
57 description('Test that Mutation Records are delivered following FileSystem callbacks.');
59 testFilesystem();
60 </script>