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

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

Issue 2542073002: DevTools: [Persistence] validate persistence binding. (Closed)
Patch Set: rebaseline tests 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
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="../isolated-filesystem-test.js"></script> 5 <script src="../isolated-filesystem-test.js"></script>
6 <script src="./persistence-test.js"></script> 6 <script src="./persistence-test.js"></script>
7 <script> 7 <script>
8 8
9 function test() 9 function test()
10 { 10 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 function onBindingCreated(theBinding) 45 function onBindingCreated(theBinding)
46 { 46 {
47 binding = theBinding; 47 binding = theBinding;
48 InspectorTest.addResult("Binding created: " + binding); 48 InspectorTest.addResult("Binding created: " + binding);
49 InspectorTest.runTestSuite(testSuite); 49 InspectorTest.runTestSuite(testSuite);
50 } 50 }
51 51
52 var testSuite = [ 52 var testSuite = [
53 function addNetworkUISourceCodeRevision(next) 53 function addNetworkUISourceCodeRevision(next)
54 { 54 {
55 nodeContent = nodeContent.replace("//TODO", "network();\n//TODO"); 55 var newContent = nodeContent.replace("//TODO", "network();\n//TODO") ;
56 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced); 56 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced);
57 binding.network.addRevision(nodeContent); 57 binding.network.addRevision(newContent);
58 58
59 function onSynced() 59 function onSynced()
60 { 60 {
61 dumpBindingContent(); 61 dumpBindingContent();
62 next(); 62 next();
63 } 63 }
64 }, 64 },
65 65
66 function setNetworkUISourceCodeWorkingCopy(next) 66 function setNetworkUISourceCodeWorkingCopy(next)
67 { 67 {
68 nodeContent = nodeContent.replace("//TODO", "workingCopy1();\n//TODO "); 68 var newContent = nodeContent.replace("//TODO", "workingCopy1();\n//T ODO");
69 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced); 69 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced);
70 binding.network.setWorkingCopy(nodeContent); 70 binding.network.setWorkingCopy(newContent);
71 71
72 function onSynced() 72 function onSynced()
73 { 73 {
74 dumpBindingContent(); 74 dumpBindingContent();
75 next(); 75 next();
76 } 76 }
77 }, 77 },
78 78
79 function changeFileSystemFile(next) 79 function changeFileSystemFile(next)
80 { 80 {
81 fsContent = fsContent.replace("//TODO", "filesystem();\n//TODO"); 81 var newContent = fsContent.replace("//TODO", "filesystem();\n//TODO" );
82 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced); 82 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced);
83 fsEntry.setContent(fsContent); 83 fsEntry.setContent(newContent);
84 84
85 function onSynced() 85 function onSynced()
86 { 86 {
87 dumpBindingContent(); 87 dumpBindingContent();
88 next(); 88 next();
89 } 89 }
90 }, 90 },
91 91
92 function setFileSystemUISourceCodeWorkingCopy(next) 92 function setFileSystemUISourceCodeWorkingCopy(next)
93 { 93 {
94 nodeContent = fsContent.replace("//TODO", "workingCopy2();\n//TODO") ; 94 var newContent = fsContent.replace("//TODO", "workingCopy2();\n//TOD O");
95 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced); 95 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten tSyncedForTest", onSynced);
96 binding.fileSystem.setWorkingCopy(nodeContent); 96 binding.fileSystem.setWorkingCopy(newContent);
97 97
98 function onSynced() 98 function onSynced()
99 { 99 {
100 dumpBindingContent(); 100 dumpBindingContent();
101 next(); 101 next();
102 } 102 }
103 }, 103 },
104 ]; 104 ];
105 105
106 function dumpBindingContent() 106 function dumpBindingContent()
(...skipping 10 matching lines...) Expand all
117 { 117 {
118 return content.split("\n").map(line => " " + line).join("\n"); 118 return content.split("\n").map(line => " " + line).join("\n");
119 } 119 }
120 }; 120 };
121 </script> 121 </script>
122 </head> 122 </head>
123 <body onload="runTest()"> 123 <body onload="runTest()">
124 <p>Verify that syncing Node.js contents works fine.</p> 124 <p>Verify that syncing Node.js contents works fine.</p>
125 </body> 125 </body>
126 </html> 126 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698