Web Inspector: highlight occurences of word in DefaultTextEditor
[WebKit-https.git] / LayoutTests / inspector / editor / text-editor-highlight-token-expected.txt
1 This test checks text editor token highlight functionality.
2
3 =========== TextEditor text ==========
4 function findElement(collection, elem) {
5         for(var i = 0; i < collection.length; ++i)
6             if (collection[i] === elem)
7                 return i;
8         return null;
9     }
10 =========== Before selecting element ===========
11
12 <div class="inner-container text-editor-editable" tabindex="0">
13 <div class="webkit-line-content">function findElement(collection, elem) {</div>
14 <div class="webkit-line-content">        for(var i = 0; i <span class="webkit-html-tag">&lt;</span> <span class="webkit-html-tag">collection.length;</span> <span class="webkit-html-attribute-name">++i)</span></div>
15 <div class="webkit-line-content">            <span class="webkit-html-attribute-name">if</span> <span class="webkit-html-attribute-name">(collection</span>[<span class="webkit-html-attribute-name">i</span>] === <span class="webkit-html-attribute-value">elem)</span></div>
16 <div class="webkit-line-content">                <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">i;</span></div>
17 <div class="webkit-line-content">        <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">null;</span></div>
18 <div class="webkit-line-content">    <span class="webkit-html-attribute-value">}</span></div></div>
19 =========== After selecting 'collection' ===========
20
21 <div class="inner-container text-editor-editable" tabindex="0">
22 <div class="webkit-line-content">function findElement(collection, elem) {<span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 146px; width: 72px;"> </span></div>
23 <div class="webkit-line-content">        for(var i = 0; i <span class="webkit-html-tag">&lt;</span> <span class="webkit-html-tag">collection.length;</span> <span class="webkit-html-attribute-name">++i)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 188px; width: 72px;"> </span></div>
24 <div class="webkit-line-content">            <span class="webkit-html-attribute-name">if</span> <span class="webkit-html-attribute-name">(collection</span>[<span class="webkit-html-attribute-name">i</span>] === <span class="webkit-html-attribute-value">elem)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 111px; width: 72px;"> </span></div>
25 <div class="webkit-line-content">                <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">i;</span></div>
26 <div class="webkit-line-content">        <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">null;</span></div>
27 <div class="webkit-line-content">    <span class="webkit-html-attribute-value">}</span></div></div>
28 =========== After selecting 'elem' ===========
29
30 <div class="inner-container text-editor-editable" tabindex="0">
31 <div class="webkit-line-content">function findElement(collection, elem) {<span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 230px; width: 30px;"> </span></div>
32 <div class="webkit-line-content">        for(var i = 0; i <span class="webkit-html-tag">&lt;</span> <span class="webkit-html-tag">collection.length;</span> <span class="webkit-html-attribute-name">++i)</span></div>
33 <div class="webkit-line-content">            <span class="webkit-html-attribute-name">if</span> <span class="webkit-html-attribute-name">(collection</span>[<span class="webkit-html-attribute-name">i</span>] === <span class="webkit-html-attribute-value">elem)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 237px; width: 30px;"> </span></div>
34 <div class="webkit-line-content">                <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">i;</span></div>
35 <div class="webkit-line-content">        <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">null;</span></div>
36 <div class="webkit-line-content">    <span class="webkit-html-attribute-value">}</span></div></div>
37