Web Inspector: show whitespace characters in DTE
[WebKit-https.git] / LayoutTests / inspector / editor / text-editor-show-whitespace-expected.txt
1 This test checks how text editor splits whitespace sequences to highlight them if the appropriate setting is set up.
2
3 Actual text:
4 function foo(a, b) {
5     // spaces in comment
6     a = "string with spaces";
7     a = 2;               a = 3;
8 }
9 ========== Editor HTML showWhitespaceInEditor OFF ==========
10
11 <div class="inner-container" tabindex="0">
12 <div class="webkit-line-content"><span class="webkit-javascript-keyword">function</span><span class="webkit-whitespace"> </span><span class="webkit-javascript-ident">foo</span>(<span class="webkit-javascript-ident">a</span>,<span class="webkit-whitespace"> </span><span class="webkit-javascript-ident">b</span>)<span class="webkit-whitespace"> </span>{</div>
13 <div class="webkit-line-content"><span class="webkit-whitespace">    </span><span class="webkit-javascript-comment">// spaces in comment</span></div>
14 <div class="webkit-line-content"><span class="webkit-whitespace">    </span><span class="webkit-javascript-ident">a</span><span class="webkit-whitespace"> </span>=<span class="webkit-whitespace"> </span><span class="webkit-javascript-string">"string with spaces"</span>;</div>
15 <div class="webkit-line-content"><span class="webkit-whitespace">    </span><span class="webkit-javascript-ident">a</span><span class="webkit-whitespace"> </span>=<span class="webkit-whitespace"> </span><span class="webkit-javascript-number">2</span>;<span class="webkit-whitespace">               </span><span class="webkit-javascript-ident">a</span><span class="webkit-whitespace"> </span>=<span class="webkit-whitespace"> </span><span class="webkit-javascript-number">3</span>;</div>
16 <div class="webkit-line-content">}</div></div>
17 ========== Editor HTML after setting showWhitespaceInEditor ON ==========
18
19 <div class="inner-container" tabindex="0">
20 <div class="webkit-line-content"><span class="webkit-javascript-keyword">function</span><span class="webkit-whitespace webkit-whitespace-1"> </span><span class="webkit-javascript-ident">foo</span>(<span class="webkit-javascript-ident">a</span>,<span class="webkit-whitespace webkit-whitespace-1"> </span><span class="webkit-javascript-ident">b</span>)<span class="webkit-whitespace webkit-whitespace-1"> </span>{</div>
21 <div class="webkit-line-content"><span class="webkit-whitespace webkit-whitespace-4">    </span><span class="webkit-javascript-comment">// spaces in comment</span></div>
22 <div class="webkit-line-content"><span class="webkit-whitespace webkit-whitespace-4">    </span><span class="webkit-javascript-ident">a</span><span class="webkit-whitespace webkit-whitespace-1"> </span>=<span class="webkit-whitespace webkit-whitespace-1"> </span><span class="webkit-javascript-string">"string with spaces"</span>;</div>
23 <div class="webkit-line-content"><span class="webkit-whitespace webkit-whitespace-4">    </span><span class="webkit-javascript-ident">a</span><span class="webkit-whitespace webkit-whitespace-1"> </span>=<span class="webkit-whitespace webkit-whitespace-1"> </span><span class="webkit-javascript-number">2</span>;<span class="webkit-whitespace webkit-whitespace-8">        </span><span class="webkit-whitespace webkit-whitespace-4">    </span><span class="webkit-whitespace webkit-whitespace-2">  </span><span class="webkit-whitespace webkit-whitespace-1"> </span><span class="webkit-javascript-ident">a</span><span class="webkit-whitespace webkit-whitespace-1"> </span>=<span class="webkit-whitespace webkit-whitespace-1"> </span><span class="webkit-javascript-number">3</span>;</div>
24 <div class="webkit-line-content">}</div></div>
25