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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-do-not-bind-dirty-sourcecode.html

Issue 2784733002: DevTools: prepare tests for Persistence2.0 release (Closed)
Patch Set: address comments + three special tests Created 3 years, 8 months 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../debugger-test.js"></script> 4 <script src="../debugger-test.js"></script>
5 <script src="../console-test.js"></script> 5 <script src="../console-test.js"></script>
6 <script src="../isolated-filesystem-test.js"></script> 6 <script src="../isolated-filesystem-test.js"></script>
7 <script src="./persistence-test.js"></script> 7 <script src="./persistence-test.js"></script>
8 <script src="./resources/foo.js"></script> 8 <script src="./resources/foo.js"></script>
9 <script> 9 <script>
10 10
11 function test() 11 function test()
12 { 12 {
13 var testMapping = InspectorTest.initializeTestMapping();
13 var fs = new InspectorTest.TestFileSystem("file:///var/www"); 14 var fs = new InspectorTest.TestFileSystem("file:///var/www");
14 InspectorTest.addFooJSFile(fs); 15 InspectorTest.addFooJSFile(fs);
15 fs.reportCreated(function() { }); 16 fs.reportCreated(function() { });
16 17
17 InspectorTest.runTestSuite([ 18 InspectorTest.runTestSuite([
18 function waitForUISourceCodes(next) 19 function waitForUISourceCodes(next)
19 { 20 {
20 Promise.all([ 21 Promise.all([
21 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.Network) 22 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.Network)
22 .then(uiSourceCode => uiSourceCode.setWorkingCopy("dirty.")) , 23 .then(uiSourceCode => uiSourceCode.setWorkingCopy("dirty.")) ,
23 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.FileSystem) 24 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.FileSystem)
24 ]).then(next); 25 ]).then(next);
25 }, 26 },
26 27
27 function addFileSystemMapping(next) 28 function addFileSystemMapping(next)
28 { 29 {
29 InspectorTest.addSniffer(Persistence.Persistence.prototype, '_preval idationFailedForTest', onPrevalidationFailed); 30 InspectorTest.addSniffer(Persistence.Persistence.prototype, '_preval idationFailedForTest', onPrevalidationFailed);
30 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/"); 31 testMapping.addBinding('foo.js');
31 32
32 function onPrevalidationFailed(binding) 33 function onPrevalidationFailed(binding)
33 { 34 {
34 InspectorTest.addResult("Failed to create binding: " + binding); 35 InspectorTest.addResult("Failed to create binding: " + binding);
35 next(); 36 next();
36 } 37 }
37 }, 38 },
38 ]); 39 ]);
39 }; 40 };
40 </script> 41 </script>
41 </head> 42 </head>
42 <body onload="runTest()"> 43 <body onload="runTest()">
43 <p>Verify that dirty uiSourceCodes are not bound.</p> 44 <p>Verify that dirty uiSourceCodes are not bound.</p>
44 </body> 45 </body>
45 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698