| Index: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html
|
| index 0e07f82af448c5de808ef00e684c9aa8ef2bd543..53350bc4e08ab9c51b8418e8b3efdc384286cf06 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html
|
| @@ -39,43 +39,71 @@ function test()
|
| fs.addFileMapping("http://127.0.0.1:8000", "/");
|
| fs.reportCreated(function() { });
|
|
|
| + var binding;
|
| InspectorTest.waitForBinding("nodejs.js").then(onBindingCreated);
|
|
|
| - function onBindingCreated(binding)
|
| + function onBindingCreated(theBinding)
|
| {
|
| + binding = theBinding;
|
| InspectorTest.addResult("Binding created: " + binding);
|
| - editNetworkUISourceCode(binding);
|
| + InspectorTest.runTestSuite(testSuite);
|
| }
|
|
|
| - function editNetworkUISourceCode(binding)
|
| - {
|
| - InspectorTest.addResult("\nRunning: Edit network uiSourceCode");
|
| - nodeContent = nodeContent.replace("//TODO", "network();\n//TODO");
|
| - InspectorTest.addSniffer(Persistence.Persistence.prototype, "_contentSyncedForTest", onSynced);
|
| - binding.network.addRevision(nodeContent);
|
| + var testSuite = [
|
| + function addNetworkUISourceCodeRevision(next)
|
| + {
|
| + nodeContent = nodeContent.replace("//TODO", "network();\n//TODO");
|
| + InspectorTest.addSniffer(Persistence.Persistence.prototype, "_contentSyncedForTest", onSynced);
|
| + binding.network.addRevision(nodeContent);
|
| +
|
| + function onSynced()
|
| + {
|
| + dumpBindingContent();
|
| + next();
|
| + }
|
| + },
|
|
|
| - function onSynced()
|
| + function setNetworkUISourceCodeWorkingCopy(next)
|
| {
|
| - dumpBindingContent(binding);
|
| - changeFileSystem(binding);
|
| - }
|
| - }
|
| + nodeContent = nodeContent.replace("//TODO", "workingCopy1();\n//TODO");
|
| + InspectorTest.addSniffer(Persistence.Persistence.prototype, "_contentSyncedForTest", onSynced);
|
| + binding.network.setWorkingCopy(nodeContent);
|
|
|
| - function changeFileSystem(binding)
|
| - {
|
| - InspectorTest.addResult("\nRunning: Edit fileSystem uiSourceCode");
|
| - fsContent = fsContent.replace("//TODO", "filesystem();\n//TODO");
|
| - InspectorTest.addSniffer(Persistence.Persistence.prototype, "_contentSyncedForTest", onSynced);
|
| - fsEntry.setContent(fsContent);
|
| + function onSynced()
|
| + {
|
| + dumpBindingContent();
|
| + next();
|
| + }
|
| + },
|
|
|
| - function onSynced()
|
| + function changeFileSystemFile(next)
|
| {
|
| - dumpBindingContent(binding);
|
| - InspectorTest.completeTest();
|
| - }
|
| - }
|
| + fsContent = fsContent.replace("//TODO", "filesystem();\n//TODO");
|
| + InspectorTest.addSniffer(Persistence.Persistence.prototype, "_contentSyncedForTest", onSynced);
|
| + fsEntry.setContent(fsContent);
|
| +
|
| + function onSynced()
|
| + {
|
| + dumpBindingContent();
|
| + next();
|
| + }
|
| + },
|
| +
|
| + function setFileSystemUISourceCodeWorkingCopy(next)
|
| + {
|
| + nodeContent = fsContent.replace("//TODO", "workingCopy2();\n//TODO");
|
| + InspectorTest.addSniffer(Persistence.Persistence.prototype, "_contentSyncedForTest", onSynced);
|
| + binding.fileSystem.setWorkingCopy(nodeContent);
|
| +
|
| + function onSynced()
|
| + {
|
| + dumpBindingContent();
|
| + next();
|
| + }
|
| + },
|
| + ];
|
|
|
| - function dumpBindingContent(binding)
|
| + function dumpBindingContent()
|
| {
|
| InspectorTest.addResult("Network:");
|
| InspectorTest.addResult(indent(binding.network.workingCopy()));
|
|
|