rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
if (elements) items = $$(items); return items; };
return function(){ var args = arguments; var items = []; var elements = true; $each(this, function(el){ var returns = el[property].apply(el, args); if ($type(returns) != 'element') elements = false; items.push(returns); }); if (elements) items = $$(items); return items; };
this.setup = setup || function() {};
Event.observe(td, 'click', function(){ window.location.search = "";});
this.setup = setup || function() {};
Recorder.addEventHandler('select', 'change', function(event) { var tagName = event.target.tagName.toLowerCase(); if ('select' == tagName) { if (!event.target.multiple) { var label = event.target.options[event.target.selectedIndex].innerHTML; var value = "label=" + label.replace(/^\s*(.*?)\s*$/, "$1"); this.log.debug('selectedIndex=' + event.target.selectedIndex); this.record("select", this.findLocator(event.target), value); } else { this.log.debug('change selection on select-multiple'); var options = event.target.options; for (var i = 0; i < options.length; i++) { this.log.debug('option=' + i + ', ' + options[i].selected); if (options[i]._wasSelected == null) { this.log.warn('_wasSelected was not recorded'); } if (options[i]._wasSelected != options[i].selected) { var label = options[i].innerHTML; var value = "label=" + label.replace(/^\s*(.*?)\s*$/, "$1"); if (options[i].selected) { this.record("addSelection", this.findLocator(event.target), value); } else { this.record("removeSelection", this.findLocator(event.target), value); } options[i]._wasSelected = options[i].selected; } } } } });
return "label=regexp:" + label.replace(/\s+/g, function(str) { if (str.match(/\xA0/)) { if (str.length > 1) { return "\\s+"; } else { return "\\s"; } } else { return str; } });
Recorder.addEventHandler('select', 'change', function(event) { var tagName = event.target.tagName.toLowerCase(); if ('select' == tagName) { if (!event.target.multiple) { var label = event.target.options[event.target.selectedIndex].innerHTML; var value = "label=" + label.replace(/^\s*(.*?)\s*$/, "$1"); this.log.debug('selectedIndex=' + event.target.selectedIndex); this.record("select", this.findLocator(event.target), value); } else { this.log.debug('change selection on select-multiple'); var options = event.target.options; for (var i = 0; i < options.length; i++) { this.log.debug('option=' + i + ', ' + options[i].selected); if (options[i]._wasSelected == null) { this.log.warn('_wasSelected was not recorded'); } if (options[i]._wasSelected != options[i].selected) { var label = options[i].innerHTML; var value = "label=" + label.replace(/^\s*(.*?)\s*$/, "$1"); if (options[i].selected) { this.record("addSelection", this.findLocator(event.target), value); } else { this.record("removeSelection", this.findLocator(event.target), value); } options[i]._wasSelected = options[i].selected; } } } } });
tables.each(function (table) { $A(table.rows).each(function(candidateRow) { if (self.isCommandRow(candidateRow)) { commandRows.push(new HtmlTestCaseRow(candidateRow)); } }.bind(this)); });
window.setTimeout(function() { htmlTestRunner.runNextTest(); }, 1);
tables.each(function (table) { $A(table.rows).each(function(candidateRow) { if (self.isCommandRow(candidateRow)) { commandRows.push(new HtmlTestCaseRow(candidateRow)); } }.bind(this)); });
if((typeof this.options.value == 'undefined') && ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true;
collection.each(function(e,i) { optionTag = document.createElement("option"); optionTag.value = (e instanceof Array) ? e[0] : e; if(this.options.value==optionTag.value) optionTag.selected = true; optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e)); selectTag.appendChild(optionTag); }.bind(this));
function(s) { var stdout = document.getElementById('stdout'); stdout.innerHTML = stdout.innerHTML + escapeHTML(s); });
return function(sym) { counter++; if (!sym) sym = sc_SYMBOL_PREFIX; return sym + "s" + counter + "~" + "^sC-GeNsYm "; };
function(s) { var stdout = document.getElementById('stdout'); stdout.innerHTML = stdout.innerHTML + escapeHTML(s); });
name = name.replace(new RegExp('\\$(\\d+)','g'), function (N) {
name = name.replace(new RegExp('\\$(\\d+)','g'), function (all, N) {
name = name.replace(new RegExp('\\$(\\d+)','g'), function (N) { if (typeof(ifs_match) != 'object' || typeof(ifs_match[N]) == 'undefined') return '' return ifs_match[N]; });
window.setTimeout(function() { htmlTestRunner.runNextTest(); }, 1);
this.trElement.onclick = fnBindAsEventListener(function() { this.onClick(); }, this);
window.setTimeout(function() { htmlTestRunner.runNextTest(); }, 1);
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
return pairs.inject({}, function(params, pairString) { var pair = pairString.split('='); params[pair[0]] = pair[1]; return params; });
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
this.view.addEventListener("load", function() { self.reload() }, true);
function() { if (self.selectedDefinition) { self.doShow(); } },
this.view.addEventListener("load", function() { self.reload() }, true);
return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1];
return this.gsub(pattern, function(match) { if (--count < 0) return match[0]; return replacement(match);
return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1]; });
$A(element.childNodes).each( function(child) { if(child.nodeType==3) { child.nodeValue.toArray().each( function(character) {
child.nodeValue.toArray().each( function(character) {
$A(element.childNodes).each( function(child) { if(child.nodeType==3) { child.nodeValue.toArray().each( function(character) { element.insertBefore( Builder.node('span',{style: tagifyStyle}, character == " " ? String.fromCharCode(160) : character), child); }); Element.remove(child); } });
Element.remove(child); } });
$A(element.childNodes).each( function(child) { if(child.nodeType==3) { child.nodeValue.toArray().each( function(character) { element.insertBefore( Builder.node('span',{style: tagifyStyle}, character == " " ? String.fromCharCode(160) : character), child); }); Element.remove(child); } });
setTimeout(function() {html.evalScripts()}, 10);
return this[value] = this[value] || function() { return value.apply(null, [this].concat($A(arguments))); }
setTimeout(function() {html.evalScripts()}, 10);
setTimeout(function() {html.evalScripts()}, 10);
return $A(children).inject([], function(elements, child) { if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) elements.push(Element.extend(child)); return elements; });
setTimeout(function() {html.evalScripts()}, 10);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this));
return $A(children).inject([], function(elements, child) { if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) elements.push(Element.extend(child)); return elements; });
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this));
return $A(children).inject([], function(elements, child) { if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) elements.push(Element.extend(child)); return elements; });
return this[value] = this[value] || function() { return value.apply(null, [this].concat($A(arguments))); }
return $A(children).inject([], function(elements, child) { if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) elements.push(Element.extend(child)); return elements; });
fragments.each((function(fragment) { this.element.appendChild(fragment); }).bind(this));
return this[value] = this[value] || function() { return value.apply(null, [this].concat($A(arguments))); }
fragments.each((function(fragment) { this.element.appendChild(fragment); }).bind(this));
setTimeout(function() {content.evalScripts()}, 10);
setTimeout(function() {html.evalScripts()}, 10);
setTimeout(function() {content.evalScripts()}, 10);
return this[value] = this[value] || function() { return value.apply(null, [this].concat($A(arguments))); }
setTimeout(function() {html.evalScripts()}, 10);
return this[value] = this[value] || function() { return value.apply(null, [this].concat($A(arguments))); }
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this));
setTimeout(function() {html.evalScripts()}, 10);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this));
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element); }).bind(this));
setTimeout(function() {content.evalScripts()}, 10);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element); }).bind(this));
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element); }).bind(this));
setTimeout(function() {html.evalScripts()}, 10);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element); }).bind(this));
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
setTimeout(function() {html.evalScripts()}, 10);
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this));
setTimeout(function() {html.evalScripts()}, 10);
$H({'id': 'id', 'className': 'class'}).each(function(pair) { var property = pair.first(), attribute = pair.last(); var value = (element[property] || '').toString(); if (value) result += ' ' + attribute + '=' + value.inspect(true); });
setTimeout(function() {html.evalScripts()}, 10);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this));
setTimeout(function() {content.evalScripts()}, 10);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this));
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
setTimeout(function() {content.evalScripts()}, 10);
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
fragments.each((function(fragment) { this.element.appendChild(fragment);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild);
fragments.each((function(fragment) { this.element.appendChild(fragment); }).bind(this));
$H({'id': 'id', 'className': 'class'}).each(function(pair) { var property = pair.first(), attribute = pair.last(); var value = (element[property] || '').toString(); if (value) result += ' ' + attribute + '=' + value.inspect(true); });
$A(element.childNodes).each(function(node){ element.removeChild(node) });
$H({'id': 'id', 'className': 'class'}).each(function(pair) { var property = pair.first(), attribute = pair.last(); var value = (element[property] || '').toString(); if (value) result += ' ' + attribute + '=' + value.inspect(true); });
this.element.appendChild(fragment);
this.element.parentNode.insertBefore(fragment, this.element);
fragments.each((function(fragment) { this.element.appendChild(fragment); }).bind(this));
return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); });
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element); }).bind(this));
return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); });
this.element.parentNode.insertBefore(fragment, this.element.nextSibling);
this.element.appendChild(fragment);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this));
$A(element.childNodes).each(function(node){ element.removeChild(node) });
depth.times(function(){ div = div.firstChild });
$A(element.childNodes).each(function(node){ element.removeChild(node) });
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this));
return parameter[1].map(function(value) { return key + '=' + encodeURIComponent(value); }).join('&');
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this));
return parameter[1].map(function(value) { return key + '=' + encodeURIComponent(value); }).join('&');
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this));
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
depth.times(function(){ div = div.firstChild });
function(node){ element.appendChild(node) });
depth.times(function(){ div = div.firstChild });
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
fragments.each((function(fragment) { this.element.appendChild(fragment); }).bind(this));
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
depth.times(function(){ div = div.childNodes[0] });
depth.times(function(){ div = div.firstChild });
depth.times(function(){ div = div.childNodes[0] });
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
function(node){ element.appendChild(node) });
setTimeout(function() {html.evalScripts()}, 10);
function(node){ element.appendChild(node) });
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this));
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
setTimeout(function() {html.evalScripts()}, 10);
['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { var klass = window['HTML' + tag + 'Element'] = {}; klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; });
setTimeout(function() {html.evalScripts()}, 10);
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
if(Droppables.isAffected(point, element, drop)) { if(drop.onHover) drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); if(drop.greedy) { Droppables.activate(drop); throw $break; } }
if(Droppables.isAffected(point, element, drop)) affected.push(drop);
this.drops.each( function(drop) { if(Droppables.isAffected(point, element, drop)) { if(drop.onHover) drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); if(drop.greedy) { Droppables.activate(drop); throw $break; } } });
this.each(function(f){ f.apply(this, args) });
$A(element.childNodes).each( function(child) { if(child.nodeType==3) { child.nodeValue.toArray().each( function(character) { element.insertBefore( Builder.node('span',{style: tagifyStyle}, character == ' ' ? String.fromCharCode(160) : character), child); }); Element.remove(child); } });
this.each(function(f){ f.apply(this, args) });
this.each(function(value, index) { if (!(result &= (iterator || Prototype.K)(value, index))) throw _break; });
this._each(function(value) { try { iterator(value, index++); } catch (e) { if (e != $continue) throw e; } });
this.each(function(value, index) { if (!(result &= (iterator || Prototype.K)(value, index))) throw _break; });
$each(this.attributes, function(attribute){ if (attribute.name != 'name') el.setProperty(attribute.name, attribute.value); });
this.events[type].keys.each(function(fn){ this.removeEvent(type, fn); });
$each(this.attributes, function(attribute){ if (attribute.name != 'name') el.setProperty(attribute.name, attribute.value); });
return element.alt == locator
return element.className == locator
function(element) { return element.alt == locator }
return element.className == locator
return element.alt == locator
function(element) { return element.className == locator }
element.value)) {
(element.value && (element.value instanceof String)))) {
CommandBuilders.add('accessor', function(window) { var result = { accessor: "value" }; var element = this.getRecorder(window).clickedElement; if (element && element.hasAttribute && element.tagName && ('input' == element.tagName.toLowerCase() || 'textarea' == element.tagName.toLowerCase() || element.value)) { result.target = this.getRecorder(window).clickedElementLocator; var type = element.getAttribute("type"); if ('input' == element.tagName.toLowerCase() && (type == 'checkbox' || type == 'radio')) { result.value = element.checked ? 'on' : 'off'; } else { result.value = exactMatchPattern(element.value); } } else { result.disabled = true; } return result; });
var type = $type(returns); if (type != 'element') elements = false;
if ($type(returns) != 'element') elements = false;
$each(this, function(el){ var returns = el[property].apply(el, args); var type = $type(returns); if (type != 'element') elements = false; items.push(returns); });
$each(this, function(el){ var returns = el[property].apply(el, args); if ($type(returns) != 'element') elements = false; items.push(returns); });
$each(this.attributes, function(attribute){ if (attribute.name != 'name') el.setProperty(attribute.name, attribute.value); });
$each(this, function(el){ var returns = el[property].apply(el, args); if ($type(returns) != 'element') elements = false; items.push(returns); });
this.teardown = teardown || function() {};
expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ?
this.teardown = teardown || function() {};
Recorder.addEventHandler('clickLocator', 'click', function(event) { if (event.button == 0) { var clickable = this.findClickableElement(event.target); if (clickable) { this.clickLocator = this.findLocator(clickable);
Recorder.addEventHandler('select', 'change', function(event) { var tagName = event.target.tagName.toLowerCase(); if ('select' == tagName) { if (!event.target.multiple) { var option = event.target.options[event.target.selectedIndex]; this.log.debug('selectedIndex=' + event.target.selectedIndex); this.record("select", this.findLocator(event.target), this.getOptionLocator(option)); } else { this.log.debug('change selection on select-multiple'); var options = event.target.options; for (var i = 0; i < options.length; i++) { this.log.debug('option=' + i + ', ' + options[i].selected); if (options[i]._wasSelected == null) { this.log.warn('_wasSelected was not recorded'); } if (options[i]._wasSelected != options[i].selected) { var value = this.getOptionLocator(options[i]); if (options[i].selected) { this.record("addSelection", this.findLocator(event.target), value); } else { this.record("removeSelection", this.findLocator(event.target), value); } options[i]._wasSelected = options[i].selected; } }
Recorder.addEventHandler('clickLocator', 'click', function(event) { if (event.button == 0) { var clickable = this.findClickableElement(event.target); if (clickable) { this.clickLocator = this.findLocator(clickable); } } }, { capture: true });
}, { capture: true });
});
Recorder.addEventHandler('clickLocator', 'click', function(event) { if (event.button == 0) { var clickable = this.findClickableElement(event.target); if (clickable) { this.clickLocator = this.findLocator(clickable); } } }, { capture: true });
});
}, this);
this.events[type].keys.each(function(fn){ this.removeEvent(type, fn); });
menu.push([ HTMLArea._lc("Cut", "ContextMenu"), function() { editor.execCommand("cut"); }, null, config.btnList["cut"][1] ],
function() { editor._insertImage(img); },
menu.push([ HTMLArea._lc("Cut", "ContextMenu"), function() { editor.execCommand("cut"); }, null, config.btnList["cut"][1] ],
var nodeList = e.childNodes; for (var i = 0; i < nodeList.length; i++) { var node = nodeList[i]; if (node.nodeName == 'IMG' && node.alt != '') { return " } }
LocatorBuilders.add('linkXPath', function(e) { if (e.nodeName == 'A') { var nodeList = e.childNodes; for (var i = 0; i < nodeList.length; i++) { var node = nodeList[i]; if (node.nodeName == 'IMG' && node.alt != '') { return "//a[img/@alt=" + this.attributeValue(node.alt) + "]"; } } var text = e.textContent; if (!text.match(/^\s*$/)) { return "//a[contains(text(),'" + text.replace(/^\s+/,'').replace(/\s+$/,'') + "')]"; } } return null; });
ret = ret.replace(new RegExp('\\$(\\d+)','g'), function (N) {
ret = ret.replace(new RegExp('\\$(\\d+)','g'), function (all, N) {
ret = ret.replace(new RegExp('\\$(\\d+)','g'), function (N) { if (typeof(ifs_match) != 'object' || typeof(ifs_match[N]) == 'undefined') return '' return ifs_match[N]; });
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
this._each(function(value) { try { iterator(value, index++); } catch (e) { if (e != $continue) throw e; } });
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
new effect(element, Object.extend(options, { delay: options.delay + index * options.speed }));
new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
$A(elements).each( function(element, index) { new effect(element, Object.extend(options, { delay: options.delay + index * options.speed })); });
this.log.entries.forEach(function(entry) { self.onAppendEntry(entry); });
this.view.addEventListener("load", function() { self.reload() }, true);
this.log.entries.forEach(function(entry) { self.onAppendEntry(entry); });
return pairs.inject({}, function(params, pairString) { var pair = pairString.split('='); params[pair[0]] = pair[1]; return params;
return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1];
return pairs.inject({}, function(params, pairString) { var pair = pairString.split('='); params[pair[0]] = pair[1]; return params; });
child.nodeValue.toArray().each( function(character) { element.insertBefore( Builder.node('span',{style: tagifyStyle}, character == " " ? String.fromCharCode(160) : character), child); });
$A(elements).each( function(element, index) { new effect(element, Object.extend(options, { delay: delay + index * speed })); });
child.nodeValue.toArray().each( function(character) { element.insertBefore( Builder.node('span',{style: tagifyStyle}, character == " " ? String.fromCharCode(160) : character), child); });
var klass = window['HTML' + tag + 'Element'] = {};
var className = 'HTML' + tag + 'Element'; if(window[className]) return; var klass = window[className] = {};
['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { var klass = window['HTML' + tag + 'Element'] = {}; klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; });
return $A(arguments).map(function(expression) { return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); }); }).flatten();
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
return $A(arguments).map(function(expression) { return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); }); }).flatten();
['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { var klass = window['HTML' + tag + 'Element'] = {}; klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; });
[HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) { copy(Form.Element.Methods, klass.prototype); });
['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { var klass = window['HTML' + tag + 'Element'] = {}; klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; });
return $A(arguments).map(function(expression) { return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); }); }).flatten();
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
return $A(arguments).map(function(expression) { return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); }); }).flatten();
return expression.strip().split(/\s+/).inject([null], function(results, expr) {
return $A(arguments).map(function(expression) { return expression.strip().split(/\s+/).inject([null], function(results, expr) {
return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); });
}).flatten();
return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); });
[HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) { copy(Form.Element.Methods, klass.prototype); });
setTimeout(function() {content.evalScripts()}, 10);
[HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) { copy(Form.Element.Methods, klass.prototype); });
return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); });
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); });
return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten();
return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); });
setTimeout(function() {content.evalScripts()}, 10);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element); }).bind(this));
setTimeout(function() {content.evalScripts()}, 10);
return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
return $A(arguments).map(function(expression) { return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten();
return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); });
}).flatten();
return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); });
return parameter[1].map(function(value) { return key + '=' + encodeURIComponent(value); }).join('&');
return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); });
return parameter[1].map(function(value) { return key + '=' + encodeURIComponent(value); }).join('&');
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element); }).bind(this));
return parameter[1].map(function(value) { return key + '=' + encodeURIComponent(value); }).join('&');
return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.map(selector.findElements.bind(selector)).flatten(); });
return parameter[1].map(function(value) { return key + '=' + encodeURIComponent(value); }).join('&');
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild);
fragments.each((function(fragment) { this.element.appendChild(fragment);
fragments.reverse(false).each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this));
this.element.appendChild(fragment);
this.element.parentNode.insertBefore(fragment, this.element.nextSibling);
fragments.each((function(fragment) { this.element.appendChild(fragment); }).bind(this));
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this));
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this));
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator);
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
this.set(this.select(function(className) { return className != classNameToRemove; }).join(' '));
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; }
return expressions.map(function(expression) { return expression.strip().split(/\s+/).inject([null], function(results, expr) { var selector = new Selector(expr); return results.inject([], function(elements, result) { return elements.concat(selector.findElements(result || element)); });
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
}).flatten();
clause.each(function(attribute) { var value = 'element.getAttribute(' + attribute.name.inspect() + ')'; var splitValueBy = function(delimiter) { return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; } switch (attribute.operator) { case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; case '|=': conditions.push( splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() ); break; case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; case '': case undefined: conditions.push(value + ' != null'); break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } });
$A(element.childNodes).each( function(child) { if(child.nodeType==3) { child.nodeValue.toArray().each( function(character) {
child.nodeValue.toArray().each( function(character) {
$A(element.childNodes).each( function(child) { if(child.nodeType==3) { child.nodeValue.toArray().each( function(character) { element.insertBefore( Builder.node('span',{style: tagifyStyle}, character == ' ' ? String.fromCharCode(160) : character), child); }); Element.remove(child); } });
Element.remove(child); } });
$A(element.childNodes).each( function(child) { if(child.nodeType==3) { child.nodeValue.toArray().each( function(character) { element.insertBefore( Builder.node('span',{style: tagifyStyle}, character == ' ' ? String.fromCharCode(160) : character), child); }); Element.remove(child); } });
tinyMCE.addEvent(element, "focus", function (e) {window.setTimeout(function() {TinyMCE_Engine.prototype.confirmAdd(e, settings);}, 10);});
tinyMCE.addEvent(element, "click", function (e) {window.setTimeout(function() {TinyMCE_Engine.prototype.confirmAdd(e, settings);}, 10);});
tinyMCE.addEvent(element, "focus", function (e) {window.setTimeout(function() {TinyMCE_Engine.prototype.confirmAdd(e, settings);}, 10);});
if (result &= (iterator || Prototype.K)(value, index)) throw _break;
if (!(result &= (iterator || Prototype.K)(value, index))) throw $break;
this.each(function(value, index) { if (result &= (iterator || Prototype.K)(value, index)) throw _break; });
Garbage.elements.each(function(el){ el.removeEvents(); for (var p in Element.prototype) HTMLElement[p] = window[p] = document[p] = el[p] = null; el.extend = null; });
this.events[type].keys.each(function(fn){ fn.apply(this, args || []); }, this);
Garbage.elements.each(function(el){ el.removeEvents(); for (var p in Element.prototype) HTMLElement[p] = window[p] = document[p] = el[p] = null; el.extend = null; });
return pairs.inject({}, function(params, pairString) { var pair = pairString.split('='); params[pair[0]] = pair[1]; return params; });
return this.extractScripts().map(function(script) { return eval(script) });
return pairs.inject({}, function(params, pairString) { var pair = pairString.split('='); params[pair[0]] = pair[1]; return params; });
this.clickLocator = this.findLocator(clickable);
this.clickLocator = this.findLocator(event.target);
Recorder.addEventHandler('clickLocator', 'click', function(event) { if (event.button == 0) { var clickable = this.findClickableElement(event.target); if (clickable) { this.clickLocator = this.findLocator(clickable); } } }, { capture: true });
fn.apply(this, args || []);
fn.apply(this, args);
this.events[type].keys.each(function(fn){ fn.apply(this, args || []); }, this);
$each(this.attributes, function(attribute){ if (attribute.name != 'name') el.setProperty(attribute.name, attribute.value); });
Garbage.elements.each(function(el){ el.removeEvents(); for (var p in Element.prototype){ HTMLElement[p] = window[p] = document[p] = el[p] = null; } el.extend = null; });
$each(this.attributes, function(attribute){ if (attribute.name != 'name') el.setProperty(attribute.name, attribute.value); });
function(p){ Object.extend(p, Test.BDDMethods) }
elements.zip(expressions).all(function(pair, index) { var element = $(pair.first()), expression = pair.last(); if (element.match(expression)) return true; this.fail('assertElementsMatch: (in index ' + index + ') expected ' + expression.inspect() + ' but got ' + element.inspect()); }.bind(this)) && this.pass();
function(p){ Object.extend(p, Test.BDDMethods) }
Recorder.addEventHandler('click', 'click', function(event) {
Recorder.addEventHandler('clickLocator', 'click', function(event) {
Recorder.addEventHandler('click', 'click', function(event) { if (event.button == 0) { if (this.clickLocator) { this.record("click", this.clickLocator, ''); delete this.clickLocator; } } });