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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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="../workspace-test.js"></script> 5 <script src="../workspace-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 fs = new InspectorTest.TestFileSystem("file:///var/www"); 13 var fs = new InspectorTest.TestFileSystem("file:///var/www");
14 var fsEntry = InspectorTest.addFooJSFile(fs); 14 var fsEntry = InspectorTest.addFooJSFile(fs);
15 15
16 var networkCode, fileSystemCode; 16 var networkCode, fileSystemCode;
17 17
18 InspectorTest.runTestSuite([ 18 InspectorTest.runTestSuite([
19 function addFileSystem(next) 19 function addFileSystem(next)
20 { 20 {
21 fs.reportCreated(next); 21 fs.reportCreated(next);
22 }, 22 },
23 23
24 function addFileMapping(next) 24 function addFileMapping(next)
25 { 25 {
26 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); 26 InspectorTest.waitForBinding("foo.js").then(onBindingCreated);
27 WebInspector.fileSystemMapping.addFileMapping(fs.fileSystemPath, "ht tp://127.0.0.1:8000", "/"); 27 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/");
28 28
29 function onBindingCreated(binding) 29 function onBindingCreated(binding)
30 { 30 {
31 InspectorTest.addResult("Binding created: " + binding); 31 InspectorTest.addResult("Binding created: " + binding);
32 networkCode = binding.network; 32 networkCode = binding.network;
33 fileSystemCode = binding.fileSystem; 33 fileSystemCode = binding.fileSystem;
34 next(); 34 next();
35 } 35 }
36 }, 36 },
37 37
38 function changeFileSystem(next) 38 function changeFileSystem(next)
39 { 39 {
40 InspectorTest.addSniffer(WebInspector.Persistence.prototype, "_conte ntSyncedForTest", onSynced); 40 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced);
41 fsEntry.setContent("window.foo3 = 3;"); 41 fsEntry.setContent("window.foo3 = 3;");
42 42
43 function onSynced() 43 function onSynced()
44 { 44 {
45 InspectorTest.addResult(`network code: '${networkCode.workingCop y()}'`); 45 InspectorTest.addResult(`network code: '${networkCode.workingCop y()}'`);
46 InspectorTest.addResult(`fileSystem code: '${fileSystemCode.work ingCopy()}'`); 46 InspectorTest.addResult(`fileSystem code: '${fileSystemCode.work ingCopy()}'`);
47 next(); 47 next();
48 } 48 }
49 }, 49 },
50 50
51 function changeNetworkUISourceCode(next) 51 function changeNetworkUISourceCode(next)
52 { 52 {
53 InspectorTest.addSniffer(WebInspector.Persistence.prototype, "_conte ntSyncedForTest", onSynced); 53 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced);
54 networkCode.addRevision("window.foo2 = 2;"); 54 networkCode.addRevision("window.foo2 = 2;");
55 55
56 function onSynced() 56 function onSynced()
57 { 57 {
58 InspectorTest.addResult(`network code: '${networkCode.workingCop y()}'`); 58 InspectorTest.addResult(`network code: '${networkCode.workingCop y()}'`);
59 InspectorTest.addResult(`fileSystem code: '${fileSystemCode.work ingCopy()}'`); 59 InspectorTest.addResult(`fileSystem code: '${fileSystemCode.work ingCopy()}'`);
60 next(); 60 next();
61 } 61 }
62 } 62 }
63 ]); 63 ]);
64 }; 64 };
65 </script> 65 </script>
66 </head> 66 </head>
67 <body onload="runTest()"> 67 <body onload="runTest()">
68 <p>Tests that persistence syncs network and filesystem UISourceCodes.</p> 68 <p>Tests that persistence syncs network and filesystem UISourceCodes.</p>
69 </body> 69 </body>
70 </html> 70 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698