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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-do-not-overwrite-css.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="../isolated-filesystem-test.js"></script> 4 <script src="../isolated-filesystem-test.js"></script>
5 <script src="../debugger-test.js"></script> 5 <script src="../debugger-test.js"></script>
6 <script src="./persistence-test.js"></script> 6 <script src="./persistence-test.js"></script>
7 <script src="./automapping-test.js"></script> 7 <script src="./automapping-test.js"></script>
8 <style> 8 <style>
9 body { 9 body {
10 color: red; 10 color: red;
11 } 11 }
12 /*# sourceURL=http://127.0.0.1:8000/simple.css */ 12 /*# sourceURL=http://127.0.0.1:8000/simple.css */
13 </style> 13 </style>
14 <script> 14 <script>
15 15
16 function test() 16 function test()
17 { 17 {
18 var testMapping = InspectorTest.initializeTestMapping();
18 var fsUISourceCode, fs; 19 var fsUISourceCode, fs;
19 20
20 InspectorTest.runTestSuite([ 21 InspectorTest.runTestSuite([
21 function initializeTestFileSystem(next) 22 function initializeTestFileSystem(next)
22 { 23 {
23 InspectorTest.waitForUISourceCode('simple.css') 24 InspectorTest.waitForUISourceCode('simple.css')
24 .then(uiSourceCode => uiSourceCode.requestContent()) 25 .then(uiSourceCode => uiSourceCode.requestContent())
25 .then(onCSSContent); 26 .then(onCSSContent);
26 27
27 function onCSSContent(content) 28 function onCSSContent(content)
28 { 29 {
29 fs = new InspectorTest.TestFileSystem("file:///var/www"); 30 fs = new InspectorTest.TestFileSystem("file:///var/www");
30 InspectorTest.addFiles(fs, { "simple.css": { content: content }, }); 31 InspectorTest.addFiles(fs, { "simple.css": { content: content }, });
31 fs.reportCreated(next); 32 fs.reportCreated(next);
32 } 33 }
33 }, 34 },
34 35
35 function waitForPersistenceBinding(next) 36 function waitForPersistenceBinding(next)
36 { 37 {
37 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000/", "/"); 38 testMapping.addBinding('simple.css');
38 InspectorTest.waitForBinding('simple.css').then(onBinding); 39 InspectorTest.waitForBinding('simple.css').then(onBinding);
39 40
40 function onBinding(binding) 41 function onBinding(binding)
41 { 42 {
42 fsUISourceCode = binding.fileSystem; 43 fsUISourceCode = binding.fileSystem;
43 fsUISourceCode.requestContent().then(onContent); 44 fsUISourceCode.requestContent().then(onContent);
44 } 45 }
45 46
46 function onContent(content) { 47 function onContent(content) {
47 InspectorTest.addResult('Initial content of file:///var/www/simp le.css'); 48 InspectorTest.addResult('Initial content of file:///var/www/simp le.css');
(...skipping 30 matching lines...) Expand all
78 next() 79 next()
79 } 80 }
80 ]); 81 ]);
81 } 82 }
82 </script> 83 </script>
83 </head> 84 </head>
84 <body onload="runTest()"> 85 <body onload="runTest()">
85 <p>Verify that persistence does not overwrite CSS files when CSS model reports e rror on getStyleSheetText.</p> 86 <p>Verify that persistence does not overwrite CSS files when CSS model reports e rror on getStyleSheetText.</p>
86 </body> 87 </body>
87 </html> 88 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698