Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: pages/filters/websocket.tmpl

Issue 29755578: Issue 2148 - Rewrite the testpages test suite (Closed)
Left Patch Set: Addressed Dave's feedback Created June 4, 2018, 1:21 p.m.
Right Patch Set: Fixed README title Created June 7, 2018, 1:58 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « pages/filters/webrtc.tmpl ('k') | pages/filters/xmlhttprequest.tmpl » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 title = $websocket 1 title = $websocket
2 template = testcase 2 template = testcase
3 3
4 {% set testcase_moreinfo = [ 4 {% set testcase_moreinfo = [
5 ("Filter Options", "https://adblockplus.org/filters#options"), 5 ("Filter Options", "https://adblockplus.org/filters#options"),
6 ] %} 6 ] %}
7 7
8 8
9 <script> 9 <script>
10 function pagelog(message) {
11 var log = document.getElementById("testcase-fo-websocket");
12 log.innerText = log.innerText + message + "\n";
13 console.log(message);
14 }
15
16 function ws_open(evt) { 10 function ws_open(evt) {
17 pagelog("Connected"); 11 pagelog("Connected");
18 websocket.send("Test message was echoed back"); 12 websocket.send("Test message was echoed back");
19 } 13 }
20 function ws_close(evt) { 14 function ws_close(evt) {
21 pagelog("Disconnected"); 15 pagelog("Disconnected");
22 } 16 }
23 function ws_message(evt) { 17 function ws_message(evt) {
24 pagelog("Received message: "); 18 pagelog("Received message: ");
25 pagelog(evt.data); 19 pagelog(evt.data);
(...skipping 21 matching lines...) Expand all
47 41
48 <section class="site-panel"> 42 <section class="site-panel">
49 <h2>$websocket</h2> 43 <h2>$websocket</h2>
50 <p>Check that usage of the $websocket filter option works as expected.</p> 44 <p>Check that usage of the $websocket filter option works as expected.</p>
51 <p>With the filter displayed below each test case added to ABP (or with the te stcase subscription installed and active), the websocket connection should be bl ocked and not echo back the test message.</p> 45 <p>With the filter displayed below each test case added to ABP (or with the te stcase subscription installed and active), the websocket connection should be bl ocked and not echo back the test message.</p>
52 </section> 46 </section>
53 47
54 <section class="site-panel"> 48 <section class="site-panel">
55 <h2>Test case</h2> 49 <h2>Test case</h2>
56 <div class="testcase-container"> 50 <div class="testcase-container">
57 <div class="testcase-row"><h3>WebSocket Request</h3><div id="testcase-fo-webs ocket"></div></div> 51 <div class="testcase-row"><h3>WebSocket Request</h3><div id="testcase-output" ></div></div>
58 </div> 52 </div>
59 <h3>Filters</h3> 53 <h3>Filters</h3>
60 <pre>$websocket,domain=testpages.adblockplus.org</pre> 54 <pre>$websocket,domain=testpages.adblockplus.org</pre>
61 </section> 55 </section>
LEFTRIGHT

Powered by Google App Engine
This is Rietveld