Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:sstephenson/prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed May 12, 2010
2 parents 3e7bbca + 0ce5f4f commit 202a7a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2005-2008 Sam Stephenson
Copyright (c) 2005-2010 Sam Stephenson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/prototype.js
@@ -1,5 +1,5 @@
/* Prototype JavaScript framework, version <%= PROTOTYPE_VERSION %>
* (c) 2005-2009 Sam Stephenson
* (c) 2005-2010 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
Expand Down
20 changes: 2 additions & 18 deletions test/unit/selector_test.js
Expand Up @@ -95,11 +95,6 @@ new Test.Unit.Runner({
this.assertEnumEqual([$('attr_with_dash')], $$('[foo-bar]'), "attribute with hyphen");
},

testSelectorWithUniversalAndHyphenTokenizedAttributeValue: function() {
this.assertEnumEqual([$('item_3')], $$('*[xml:lang|="es"]'));
this.assertEnumEqual([$('item_3')], $$('*[xml:lang|="ES"]'));
},

testSelectorWithTagNameAndNegatedAttributeValue: function() {
this.assertEnumEqual([], $$('a[href!="#"]'));
},
Expand Down Expand Up @@ -171,17 +166,6 @@ new Test.Unit.Runner({

// AND NOW COME THOSE NEW TESTS AFTER ANDREW'S REWRITE!

testSelectorWithNamespacedAttributes: function() {
if (Prototype.BrowserFeatures.XPath) {
this.assertUndefined(new Selector('html[xml:lang]').xpath);
this.assertUndefined(new Selector('body p[xml:lang]').xpath);
} else
this.info("Could not test XPath bypass: no XPath to begin with!");

this.assertElementsMatch($$('[xml:lang]'), 'html', '#item_3');
this.assertElementsMatch($$('*[xml:lang]'), 'html', '#item_3');
},

testSelectorWithChild: function() {
this.assertEnumEqual($('link_1', 'link_2'), $$('p.first > a'));
this.assertEnumEqual($('father', 'uncle'), $$('div#grandfather > div'));
Expand Down Expand Up @@ -336,8 +320,8 @@ new Test.Unit.Runner({
},

testCommasFor$$: function() {
this.assertEnumEqual($('p', 'link_1', 'list', 'item_1', 'item_3', 'troubleForm'), $$('#list, .first,*[xml:lang="es-us"] , #troubleForm'));
this.assertEnumEqual($('p', 'link_1', 'list', 'item_1', 'item_3', 'troubleForm'), $$('#list, .first,', '*[xml:lang="es-us"] , #troubleForm'));
this.assertEnumEqual($('p', 'link_1', 'list', 'item_1', 'item_3', 'troubleForm'), $$('#list, .first,#item_3 , #troubleForm'));
this.assertEnumEqual($('p', 'link_1', 'list', 'item_1', 'item_3', 'troubleForm'), $$('#list, .first,', '#item_3 , #troubleForm'));
this.assertEnumEqual($('commaParent', 'commaChild'), $$('form[title*="commas,"], input[value="#commaOne,#commaTwo"]'));
this.assertEnumEqual($('commaParent', 'commaChild'), $$('form[title*="commas,"]', 'input[value="#commaOne,#commaTwo"]'));
},
Expand Down

0 comments on commit 202a7a7

Please sign in to comment.