Chromium Code Reviews| 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); |
| } |