blob: f13c574272d4c989bec31b1e2891f1909ea387e6 [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="editor-test.js"></script>
<script>
function test()
{
function foo(a, b) {
// spaces in comment
a = "string with spaces";
a = 2; a = 3;
}
WebInspector.experimentsSettings.showWhitespaceInEditor.enableForTest();
var textEditor = InspectorTest.createTestEditor();
textEditor.overrideViewportForTest(0, undefined, 3);
textEditor.mimeType = "text/javascript";
textEditor.setText(foo.toString());
InspectorTest.addResult("Actual text:");
InspectorTest.addResult(textEditor.text());
InspectorTest.addResult("========== Editor HTML after setting showWhitespaceInEditor ON ==========");
InspectorTest.dumpEditorHTML(textEditor, true);
InspectorTest.completeTest();
}
</script>
</head>
<body onload="runTest();">
<p>
This test checks how text editor splits whitespace sequences to highlight them if the appropriate
experiment is switched on.
</p>
</body>
</html>