| Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/script-snippet-model.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/script-snippet-model.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/script-snippet-model.html
|
| index be4686bb3c28d60e25aed074e8987129e0856d31..1786ee9810e18a71d65b8967d0a1c2df62f23111 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/script-snippet-model.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/script-snippet-model.html
|
| @@ -89,22 +89,32 @@ function test()
|
| }
|
|
|
| resetSnippetsSettings();
|
| -
|
| +
|
| WebInspector.scriptSnippetModel.project().createFile("", null, "", step2.bind(this));
|
| -
|
| +
|
| function step2(uiSourceCode)
|
| {
|
| uiSourceCode1 = uiSourceCode;
|
| -
|
| - uiSourceCode1.requestContent(contentCallback);
|
| - uiSourceCode1.addRevision("<snippet content>");
|
| - InspectorTest.addResult("Snippet content set.");
|
| - delete uiSourceCode1._content;
|
| - delete uiSourceCode1._contentLoaded;
|
| - uiSourceCode1.requestContent(contentCallback);
|
| - InspectorTest.addResult("Snippet1 created.");
|
|
|
| - WebInspector.scriptSnippetModel.project().createFile("", null, "", step3.bind(this));
|
| + uiSourceCode1.requestContent().then(contentCallback)
|
| + .then(contentDumped1);
|
| +
|
| + function contentDumped1()
|
| + {
|
| + uiSourceCode1.addRevision("<snippet content>");
|
| + InspectorTest.addResult("Snippet content set.");
|
| + delete uiSourceCode1._content;
|
| + delete uiSourceCode1._contentLoaded;
|
| + uiSourceCode1.requestContent()
|
| + .then(contentCallback)
|
| + .then(contentDumped2)
|
| + }
|
| +
|
| + function contentDumped2()
|
| + {
|
| + InspectorTest.addResult("Snippet1 created.");
|
| + WebInspector.scriptSnippetModel.project().createFile("", null, "", step3.bind(this));
|
| + }
|
| }
|
|
|
| function step3(uiSourceCode)
|
| @@ -119,12 +129,16 @@ function test()
|
| renameSnippetAndCheckWorkspace(uiSourceCode2, "foo");
|
| delete uiSourceCode1._content;
|
| delete uiSourceCode1._contentLoaded;
|
| - uiSourceCode1.requestContent(contentCallback);
|
| -
|
| - WebInspector.scriptSnippetModel.project().deleteFile(uiSourceCode1.url());
|
| - WebInspector.scriptSnippetModel.project().deleteFile(uiSourceCode2.url());
|
| + uiSourceCode1.requestContent()
|
| + .then(contentCallback)
|
| + .then(onContentDumped);
|
|
|
| - WebInspector.scriptSnippetModel.project().createFile("", null, "", step4.bind(this));
|
| + function onContentDumped()
|
| + {
|
| + WebInspector.scriptSnippetModel.project().deleteFile(uiSourceCode1.url());
|
| + WebInspector.scriptSnippetModel.project().deleteFile(uiSourceCode2.url());
|
| + WebInspector.scriptSnippetModel.project().createFile("", null, "", step4.bind(this));
|
| + }
|
| }
|
|
|
| function step4(uiSourceCode)
|
|
|