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

Side by Side Diff: LayoutTests/inspector/sources/debugger/script-formatter-search.html

Issue 1153923005: DevTools: shard inspector/debugger tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../../../http/tests/inspector/search/search-test.js"></script>
6 <script>
7
8 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; }
9
10 var test = function()
11 {
12 var scriptSource;
13 var shouldRequestContent = false;
14 InspectorTest.scriptFormatter().then(startDebuggerTest);
15 var scriptFormatter;
16
17 function startDebuggerTest(sf)
18 {
19 scriptFormatter = sf;
20 InspectorTest.startDebuggerTest(started);
21 }
22
23 function started()
24 {
25 InspectorTest.showScriptSource("script-formatter-search.html", didShowSc riptSource);
26 }
27
28 function didShowScriptSource(frame)
29 {
30 scriptSource = frame._uiSourceCode;
31 scriptSource.searchInContent("magic-string", true, false, dump1);
32 }
33
34 function dump1(matches)
35 {
36 InspectorTest.addResult("Pre-format search results:");
37 InspectorTest.dumpSearchMatches(matches);
38 shouldRequestContent = true;
39 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.protot ype, "_updateButton", uiSourceCodeScriptFormatted);
40 scriptFormatter._toggleFormatScriptSource();
41 }
42
43 function uiSourceCodeScriptFormatted()
44 {
45 scriptSource.searchInContent("magic-string", true, false, dump2);
46 }
47
48 function dump2(matches)
49 {
50 InspectorTest.addResult("Post-format search results:");
51 InspectorTest.dumpSearchMatches(matches);
52 InspectorTest.completeTest();
53 }
54 }
55
56 </script>
57
58 </head>
59
60 <body onload="runTest()">
61 <p>Tests that search across files works with formatted scripts.
62 </p>
63
64 </body>
65 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698