Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/script-snippet-checkContent.html

Issue 2567283004: DevTools: drastically simplify UISourceCode.checkContentUpdated (Closed)
Patch Set: kill stale test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
6 function startWorker()
7 {
8 var workerScript = "postMessage('Done.');";
9 var blob = new Blob([workerScript], { type: "text/javascript" });
10 var worker = new Worker(URL.createObjectURL(blob));
11 }
12
13 function test()
14 {
15 var uiSourceCode;
16
17 window.confirm = confirmOverride;
18
19 Snippets.scriptSnippetModel.project().createFile("", null, "", onCreated.bin d(this));
20 function onCreated(usc)
21 {
22 uiSourceCode = usc;
23 uiSourceCode.requestContent().then(onContentAvailable);
24 }
25
26 function onContentAvailable()
27 {
28 uiSourceCode.setWorkingCopy("var a = 0;");
29 uiSourceCode.checkContentUpdated(true, onUpdated);
30 }
31
32 function confirmOverride()
33 {
34 InspectorTest.addResult("FAILED: confirmation dialog appeared");
35 }
36
37 function onUpdated()
38 {
39 InspectorTest.completeTest();
40 }
41 }
42 </script>
43 </head>
44 <body onload="runTest()">
45 <p>Tests that checking content on the dirty snippet does not wipe it out.</p>
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698