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

Unified Diff: content/test/data/media/media_utils.js

Issue 408993002: Have media content and chrome browser tests load data from media/test/data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « content/test/data/media/media_source_utils.js ('k') | content/test/data/media/mse_config_change.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/media_utils.js
diff --git a/content/test/data/media/media_utils.js b/content/test/data/media/media_utils.js
deleted file mode 100644
index 8c5c1d673ba8db4084984dbaf4a689299c4d0187..0000000000000000000000000000000000000000
--- a/content/test/data/media/media_utils.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-var QueryString = function() {
- // Allows access to query parameters on the URL; e.g., given a URL like:
- // http://<server>/my.html?test=123&bob=123
- // Parameters can then be accessed via QueryString.test or QueryString.bob.
- var params = {};
- // RegEx to split out values by &.
- var r = /([^&=]+)=?([^&]*)/g;
- // Lambda function for decoding extracted match values. Replaces '+' with
- // space so decodeURIComponent functions properly.
- function d(s) { return decodeURIComponent(s.replace(/\+/g, ' ')); }
- var match;
- while (match = r.exec(window.location.search.substring(1)))
- params[d(match[1])] = d(match[2]);
- return params;
-}();
-
-function failTest(msg) {
- var failMessage = msg;
- if (msg instanceof Event)
- failMessage = msg.target + '.' + msg.type;
- console.log("FAILED TEST: " + msg);
- setResultInTitle('FAILED');
-}
-
-var titleChanged = false;
-function setResultInTitle(title) {
- // If document title is 'ENDED', then update it with new title to possibly
- // mark a test as failure. Otherwise, keep the first title change in place.
- if (!titleChanged || document.title.toUpperCase() == 'ENDED')
- document.title = title.toUpperCase();
- console.log('Set document title to: ' + title + ', updated title: ' +
- document.title);
- titleChanged = true;
-}
-
-function installTitleEventHandler(element, event) {
- element.addEventListener(event, function(e) {
- setResultInTitle(event.toString());
- }, false);
-}
-
-function convertToArray(input) {
- if (Array.isArray(input))
- return input;
- return [input];
-}
« no previous file with comments | « content/test/data/media/media_source_utils.js ('k') | content/test/data/media/mse_config_change.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698