Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1385)

Unified Diff: chrome/test/data/extensions/samples/subscribe_page_action/subscribe.html

Issue 196015: Try again to fix bug 20968, this time not breaking browser (Closed)
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/samples/subscribe_page_action/background.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/samples/subscribe_page_action/subscribe.html
diff --git a/chrome/test/data/extensions/samples/subscribe_page_action/subscribe.html b/chrome/test/data/extensions/samples/subscribe_page_action/subscribe.html
index 54860bb2c343bbee365b3cb1d5a791aeed3673ba..ec895cb49ab86c29c7d0285df72dca329bcd6b92 100644
--- a/chrome/test/data/extensions/samples/subscribe_page_action/subscribe.html
+++ b/chrome/test/data/extensions/samples/subscribe_page_action/subscribe.html
@@ -3,9 +3,14 @@
<title>Subscribe to feed</title>
<script type="text/javascript">
- // Grab the URL from the querystring, removing question mark at the front.
- var feedUrl = document.location.search.substring(1);
+ var queryString = location.search.substring(1).split("&");
+ // Grab the URL from the querystring, removing question mark at the front.
Finnur 2009/09/03 23:04:22 nit: The question mark comment now applies to the
+ var feedUrl = decodeURIComponent(queryString[0]);
+
+ // We allow synchronous requests for testing.
+ var synchronousRequest = queryString[1] == "synchronous";
+
// The XMLHttpRequest object that tries to load and parse the feed.
var req;
@@ -35,7 +40,7 @@
req = new XMLHttpRequest();
req.onload = handleResponse;
req.onerror = handleError;
- req.open("GET", feedUrl, false);
+ req.open("GET", feedUrl, !synchronousRequest);
req.send(null);
}
« no previous file with comments | « chrome/test/data/extensions/samples/subscribe_page_action/background.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698