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

Delta Between Two Patch Sets: pages/exceptions/xmlhttprequest.tmpl

Issue 29874607: Issue 6769 - Avoid hardcoding the URL (Closed)
Left Patch Set: Created Sept. 4, 2018, 4:23 p.m.
Right Patch Set: Rebased Created Sept. 24, 2018, 1:37 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/exceptions/subdocument.tmpl ('k') | pages/filters/blocking.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 = $xmlhttprequest Exception 1 title = $xmlhttprequest Exception
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 <script> 8 <script>
9 function aborted(evt) { 9 function aborted(evt) {
10 pagelog("XMLHTTPRequest was aborted."); 10 pagelog("XMLHTTPRequest was aborted.");
11 } 11 }
12 12
13 function failed(evt) { 13 function failed(evt) {
14 pagelog("XMLHTTPRequest failed."); 14 pagelog("XMLHTTPRequest failed.");
15 } 15 }
16 16
17 function makerequest() { 17 function makerequest() {
18 var req = new XMLHttpRequest(); 18 var req = new XMLHttpRequest();
19 req.addEventListener("error", failed); 19 req.addEventListener("error", failed);
20 req.addEventListener("abort", aborted); 20 req.addEventListener("abort", aborted);
21 req.open("GET", "https://{{ site_url }}/testcasefiles/xmlhttprequestexception/ text.txt", true); 21 req.open("GET", "{{ site_url }}/testcasefiles/xmlhttprequestexception/text.txt ", true);
22 req.onload = function(e) { 22 req.onload = function(e) {
23 if (this.status == 200) { 23 if (this.status == 200) {
24 pagelog(this.responseText); 24 pagelog(this.responseText);
25 } 25 }
26 }; 26 };
27 req.send(); 27 req.send();
28 } 28 }
29 29
30 document.addEventListener('DOMContentLoaded', makerequest, false); 30 document.addEventListener('DOMContentLoaded', makerequest, false);
31 </script> 31 </script>
(...skipping 16 matching lines...) Expand all
48 </div> 48 </div>
49 </div> 49 </div>
50 <div class="testcase-row"> 50 <div class="testcase-row">
51 <h3>Image</h3><img class="blocked" src="/testcasefiles/xmlhttprequestexcep tion/image.jpg"/> 51 <h3>Image</h3><img class="blocked" src="/testcasefiles/xmlhttprequestexcep tion/image.jpg"/>
52 </div> 52 </div>
53 </div> 53 </div>
54 <h3>Filters</h3> 54 <h3>Filters</h3>
55 <pre>||{{ site_url|strip_proto }}/testcasefiles/xmlhttprequestexception/*</pre > 55 <pre>||{{ site_url|strip_proto }}/testcasefiles/xmlhttprequestexception/*</pre >
56 <pre>@@{{ site_url|strip_proto }}/testcasefiles/xmlhttprequestexception/$xmlht tprequest</pre> 56 <pre>@@{{ site_url|strip_proto }}/testcasefiles/xmlhttprequestexception/$xmlht tprequest</pre>
57 </section> 57 </section>
LEFTRIGHT

Powered by Google App Engine
This is Rietveld