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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles/original-content-provider.html

Issue 2769843003: DevTools: split text_utils out of common module (Closed)
Patch Set: rebaseline Created 3 years, 9 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="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <style> 5 <style>
6 div { color: red; } 6 div { color: red; }
7 /*# sourceURL=set-style.css */ 7 /*# sourceURL=set-style.css */
8 </style> 8 </style>
9 9
10 <style> 10 <style>
(...skipping 29 matching lines...) Expand all
40 function onOriginalContentRequested(header) 40 function onOriginalContentRequested(header)
41 { 41 {
42 InspectorTest.addResult("original content loaded for header: " + header. sourceURL); 42 InspectorTest.addResult("original content loaded for header: " + header. sourceURL);
43 } 43 }
44 44
45 var headers = InspectorTest.cssModel.styleSheetHeaders(); 45 var headers = InspectorTest.cssModel.styleSheetHeaders();
46 InspectorTest.runTestSuite([ 46 InspectorTest.runTestSuite([
47 function testSetStyle(next) 47 function testSetStyle(next)
48 { 48 {
49 var header = headers.find(header => header.sourceURL.endsWith("set-s tyle.css")); 49 var header = headers.find(header => header.sourceURL.endsWith("set-s tyle.css"));
50 InspectorTest.cssModel.setStyleText(header.id, new Common.TextRange( 1, 5, 1, 18), "EDITED: EDITED", true) 50 InspectorTest.cssModel.setStyleText(header.id, new TextUtils.TextRan ge(1, 5, 1, 18), "EDITED: EDITED", true)
51 .then(success => onEdit(header, success)) 51 .then(success => onEdit(header, success))
52 .then(next); 52 .then(next);
53 }, 53 },
54 54
55 function testSetSelector(next) 55 function testSetSelector(next)
56 { 56 {
57 var header = headers.find(header => header.sourceURL.endsWith("set-s elector.css")); 57 var header = headers.find(header => header.sourceURL.endsWith("set-s elector.css"));
58 InspectorTest.cssModel.setSelectorText(header.id, new Common.TextRan ge(1, 0, 1, 3), "EDITED") 58 InspectorTest.cssModel.setSelectorText(header.id, new TextUtils.Text Range(1, 0, 1, 3), "EDITED")
59 .then(success => onEdit(header, success)) 59 .then(success => onEdit(header, success))
60 .then(next); 60 .then(next);
61 }, 61 },
62 62
63 function testSetMedia(next) 63 function testSetMedia(next)
64 { 64 {
65 var header = headers.find(header => header.sourceURL.endsWith("set-m edia.css")); 65 var header = headers.find(header => header.sourceURL.endsWith("set-m edia.css"));
66 InspectorTest.cssModel.setMediaText(header.id, new Common.TextRange( 1, 7, 1, 12), "EDITED") 66 InspectorTest.cssModel.setMediaText(header.id, new TextUtils.TextRan ge(1, 7, 1, 12), "EDITED")
67 .then(success => onEdit(header, success)) 67 .then(success => onEdit(header, success))
68 .then(next); 68 .then(next);
69 }, 69 },
70 70
71 function testSetKeyframeKey(next) 71 function testSetKeyframeKey(next)
72 { 72 {
73 var header = headers.find(header => header.sourceURL.endsWith("set-k eyframe-key.css")); 73 var header = headers.find(header => header.sourceURL.endsWith("set-k eyframe-key.css"));
74 InspectorTest.cssModel.setKeyframeKey(header.id, new Common.TextRang e(1, 23, 1, 27), "from") 74 InspectorTest.cssModel.setKeyframeKey(header.id, new TextUtils.TextR ange(1, 23, 1, 27), "from")
75 .then(success => onEdit(header, success)) 75 .then(success => onEdit(header, success))
76 .then(next); 76 .then(next);
77 }, 77 },
78 78
79 function testAddRule(next) 79 function testAddRule(next)
80 { 80 {
81 var header = headers.find(header => header.sourceURL.endsWith("add-r ule.css")); 81 var header = headers.find(header => header.sourceURL.endsWith("add-r ule.css"));
82 InspectorTest.cssModel.addRule(header.id, "EDITED {}\n", new Common. TextRange(1, 0, 1, 0)) 82 InspectorTest.cssModel.addRule(header.id, "EDITED {}\n", new TextUti ls.TextRange(1, 0, 1, 0))
83 .then(success => onEdit(header, success)) 83 .then(success => onEdit(header, success))
84 .then(next); 84 .then(next);
85 }, 85 },
86 86
87 function testSetStyleSheetText(next) 87 function testSetStyleSheetText(next)
88 { 88 {
89 var header = headers.find(header => header.sourceURL.endsWith("set-t ext.css")); 89 var header = headers.find(header => header.sourceURL.endsWith("set-t ext.css"));
90 InspectorTest.cssModel.setStyleSheetText(header.id, "EDITED {}", tru e) 90 InspectorTest.cssModel.setStyleSheetText(header.id, "EDITED {}", tru e)
91 .then(success => onEdit(header, success)) 91 .then(success => onEdit(header, success))
92 .then(next); 92 .then(next);
(...skipping 27 matching lines...) Expand all
120 </script> 120 </script>
121 </head> 121 </head>
122 122
123 <body onload="runTest()"> 123 <body onload="runTest()">
124 <p>Verifies that CSSStyleSheetHeader.originalContentProvider() indeed returns or iginal content.</p> 124 <p>Verifies that CSSStyleSheetHeader.originalContentProvider() indeed returns or iginal content.</p>
125 125
126 <div id="inspected"></div> 126 <div id="inspected"></div>
127 127
128 </body> 128 </body>
129 </html> 129 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698