| Index: third_party/WebKit/LayoutTests/inspector/file-system-project.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/file-system-project.html b/third_party/WebKit/LayoutTests/inspector/file-system-project.html
|
| index 1752459a16bd8d8c52e09234a80eed60e198c5fd..6f4dc625a30371ced66149c2120111f27f1c5980 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector/file-system-project.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector/file-system-project.html
|
| @@ -221,6 +221,42 @@ function test()
|
| next();
|
| }
|
| },
|
| +
|
| + function testUISourceCodeMetadata(next)
|
| + {
|
| + var fs = new InspectorTest.TestFileSystem("file:///var/www3");
|
| + var file = fs.root.mkdir("test").addFile("hello.js", "123456");
|
| + fs.reportCreated(function() { });
|
| + InspectorTest.waitForScriptSource("hello.js", onUISourceCode);
|
| + var uiSourceCode;
|
| +
|
| + function onUISourceCode(sourceCode)
|
| + {
|
| + uiSourceCode = sourceCode;
|
| + uiSourceCode.requestMetadata().then(onInitialMetadata);
|
| + }
|
| +
|
| + function onInitialMetadata(metadata)
|
| + {
|
| + dumpMetadata("Initial metadata", metadata);
|
| + file.setContent("changed content");
|
| + uiSourceCode.requestMetadata().then(onChangedMetadata);
|
| + }
|
| +
|
| + function onChangedMetadata(metadata)
|
| + {
|
| + dumpMetadata("Changed metadata", metadata);
|
| + fs.reportRemoved();
|
| + next();
|
| + }
|
| +
|
| + function dumpMetadata(label, metadata)
|
| + {
|
| + InspectorTest.addResult(label);
|
| + InspectorTest.addResult(" content size: " + metadata.contentSize);
|
| + InspectorTest.addResult(" modification time: " + metadata.modificationTime.toISOString());
|
| + }
|
| + },
|
| ]);
|
| };
|
| </script>
|
|
|