3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
8 var workerScript
= "postMessage('Done.');";
9 var blob
= new Blob([workerScript
], { type
: "text/javascript" });
10 var worker
= new Worker(URL
.createObjectURL(blob
));
17 window
.confirm
= confirmOverride
;
19 WebInspector
.scriptSnippetModel
.project().createFile("", null, "", onCreated
.bind(this));
20 function onCreated(path
)
22 uiSourceCode
= WebInspector
.scriptSnippetModel
.project().uiSourceCode(path
);
23 uiSourceCode
.requestContent(onContentAvailable
);
26 function onContentAvailable()
28 uiSourceCode
.setWorkingCopy("var a = 0;");
29 uiSourceCode
.checkContentUpdated(onUpdated
);
32 function confirmOverride()
34 InspectorTest
.addResult("FAILED: confirmation dialog appeared");
39 InspectorTest
.completeTest();
44 <body onload=
"runTest()">
45 <p>Tests that checking content on the dirty snippet does not wipe it out.
</p>