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

Side by Side Diff: LayoutTests/inspector/sources/debugger/content-providers.html

Issue 1238103002: [DevTools] Do not report edited resources via Page.getResourceContent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nuked concatenated, fixed comments Created 5 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4
5 <script>
6
7 function test()
8 {
9 function createMockScript(id, source, range)
10 {
11 range = range || [0, 0, 100, 0];
12 return {
13 requestContent: function(callback)
14 {
15 callback(source);
16 },
17 get lineOffset() { return range[0]; },
18 get columnOffset() { return range[1]; },
19 get endLine() { return range[2]; },
20 get endColumn() { return range[3]; }
21 };
22 }
23
24 InspectorTest.runTestSuite([
25 function testConcatenatedScriptsContentProvider(next)
26 {
27 var scripts = [];
28 scripts.push(createMockScript("1", "\nfunction baz()\n{\n return 0; \n}\n", [3, 20, 7, 0]));
29 scripts.push(createMockScript("2", "function foo() { return 0; }", [ 0, 10, 0, 38]));
30 scripts.push(createMockScript("3", "function bar() { return 0; }", [ 1, 70, 1, 98]));
31 scripts.push(createMockScript("4", "this should not appear in displa yed content", [0, 20, 0, 63]));
32 var contentProvider = new WebInspector.ConcatenatedScriptsContentPro vider(scripts);
33 function didRequestContent(content)
34 {
35 InspectorTest.addResult(content);
36 next();
37 }
38 contentProvider.requestContent(didRequestContent);
39 }
40 ]);
41 };
42
43 </script>
44
45 </head>
46
47 <body onload="runTest()">
48 <p>Tests ContentProvider implementations.</p>
49 </body>
50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698