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

Side by Side Diff: chrome/test/data/media/html/utils.js

Issue 9290008: Introduce new basic playback test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fixes. PYAUTO_TESTS. Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Miscellaneous utility functions for HTML media tests. Loading this script
6 // should not modify the page in any way.
7 //
8
9 var QueryString = function () {
10 // Allows access to query parameters on the URL; e.g., given a URL like:
11 //
12 // http://<url>/my.html?test=123&bob=123
13 //
14 // parameters can now be accessed via QueryString.test or QueryString.bob.
15 var params = {};
16
17 // RegEx to split out values by &.
18 var r = /([^&=]+)=?([^&]*)/g;
19
20 // Lambda function for decoding extracted match values. Replaces '+' with
21 // space so decodeURIComponent functions properly.
22 function d(s) { return decodeURIComponent(s.replace(/\+/g, ' ')); }
23
24 var match;
25 while (match = r.exec(window.location.search.substring(1)))
26 params[d(match[1])] = d(match[2]);
27
28 return params;
29 } ();
OLDNEW
« no previous file with comments | « chrome/test/data/media/html/media_basic_playback.html ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698