MCPcopy
hub / github.com/SeleniumHQ/selenium / setUrl

Function setUrl

third_party/js/qunit/qunit.js:6628–6648  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

6626 }
6627 }
6628 function setUrl(params) {
6629 var querystring = '?';
6630 var location = window$1.location;
6631 params = extend(extend({}, QUnit.urlParams), params);
6632 for (var key in params) {
6633 // Skip inherited or undefined properties
6634 if (hasOwn.call(params, key) && params[key] !== undefined) {
6635 // Output a parameter for each value of this key
6636 // (but usually just one)
6637 var arrValue = [].concat(params[key]);
6638 for (var i = 0; i < arrValue.length; i++) {
6639 querystring += encodeURIComponent(key);
6640 if (arrValue[i] !== true) {
6641 querystring += '=' + encodeURIComponent(arrValue[i]);
6642 }
6643 querystring += '&';
6644 }
6645 }
6646 }
6647 return location.protocol + '//' + location.host + location.pathname + querystring.slice(0, -1);
6648 }
6649 function applyUrlParams() {
6650 var filter = id('qunit-filter-input').value;
6651 window$1.location = setUrl({

Callers 5

qunit.jsFile · 0.85
toolbarChangedFunction · 0.85
applyUrlParamsFunction · 0.85
appendTestFunction · 0.85
getRerunFailedHtmlFunction · 0.85

Calls 3

extendFunction · 0.70
callMethod · 0.65
concatMethod · 0.45

Tested by

no test coverage detected