Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / editor / text-editor-search-replace.html
blob5f12a93b7ff2477af923cd2ba514e7eb021c66b0
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="../sources/debugger/resources/edit-me.js"></script>
7 <script>
9 function test()
11 var textEditor;
12 var panel = WebInspector.panels.sources;
13 InspectorTest.showScriptSource("edit-me.js", didShowScriptSource);
15 function showReplaceField()
17 var searchableView = WebInspector.panels.sources.searchableView();
18 searchableView.showSearchField();
19 searchableView._replaceCheckboxElement.click();
22 function runReplaceAll(searchValue, replaceValue)
24 panel.searchableView()._searchInputElement.value = searchValue;
25 panel.searchableView()._replaceInputElement.value = replaceValue;
26 panel.searchableView()._replaceAll();
29 function dumpTextEditor(message)
31 InspectorTest.addResult(message);
32 InspectorTest.addResult(textEditor.text());
35 function didShowScriptSource(sourceFrame)
37 textEditor = sourceFrame._textEditor;
38 showReplaceField();
40 InspectorTest.runTestSuite([
41 function testReplaceAll(next)
43 var source = "// var a1, a2, a3;\nconst a1, a2, a3;\n";
44 sourceFrame.setContent(source);
46 dumpTextEditor("--- Before replace ---");
48 runReplaceAll("a1", "a$$");
49 runReplaceAll("a2", "b$&");
50 runReplaceAll("a3", "a3 /* $0 $1 $2 $& $$ \\0 \\1 */");
51 runReplaceAll("/\\b(const)(\\s)+/", "/** @$1 */ var$2");
52 runReplaceAll("//", "//=");
54 dumpTextEditor("--- After replace ---");
56 next();
58 ]);
62 </script>
64 </head>
66 <body onload="runTest()">
67 <p>Tests the search replace functionality.</p>
69 </body>
70 </html>