Commit Graph

45 Commits

Author SHA1 Message Date
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
sra@google.com be78d098a0 Make Node.nodes.insertAll work for an end-positioned index.
R=blois@google.com

Review URL: https://codereview.chromium.org//613063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40819 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 17:54:03 +00:00
kevmoo@google.com 4283c3e41e using unittest via package import
R=sigmund@google.com

Review URL: https://codereview.chromium.org//231413003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34890 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 19:42:11 +00:00
efortuna@google.com 90873051ad Making almost all dom_ methods private. Exceptions will be addressed in a later CL.
Current ones that still remain to be made private include createElement(NS),
createRange, all the Element properties, and childNodes.

BUG=
R=blois@google.com

Review URL: https://codereview.chromium.org//23055008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26605 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 18:25:40 +00:00
sra@google.com 5a2d284a38 Revert "Revert "dart2js native mixin application should extend 'Interface', not 'Object'""
Review URL: https://codereview.chromium.org//15007011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22610 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-11 02:29:49 +00:00
sra@google.com e413e4ef0c Revert "dart2js native mixin application should extend 'Interface', not 'Object'"
BUG=

Review URL: https://codereview.chromium.org//15039023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22604 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 22:40:09 +00:00
sra@google.com a24c4034b8 dart2js native mixin application should extend 'Interface', not 'Object'
R=blois@google.com

Review URL: https://codereview.chromium.org//14619026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22602 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 22:13:51 +00:00
blois@google.com d8eecf70f8 Explicitly implementing some DOM iterable APIs for performance
The move to mixins severely regressed dart2js DOM performance, this patches it some while work continues.
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//14619013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22575 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 23:31:19 +00:00
blois@google.com 3ca6bd2dc6 Properly exposing NodeIterator and TreeWalker
Also removing references to EntityReference which is an outdated XML type.

Note that there's a bit of an oddity here around NodeFilter, which is both a class with all of the filter flags, and a function signature for a callback.

For now, I've scrubbed references to NodeFilter (the callback), but if desired I can add a new filter callback. This will most likely require a bit of Dartium work as well, so a separate CL I think.

BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//13685021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22160 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 01:36:04 +00:00
blois@google.com 59c2920a7f This is a resubmit of:
https://codereview.chromium.org/13852008/

There were some type issues in Dartium checked mode on collections which caused problems. Basically just tweaked the generic arguments on some collections.

BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//13963020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22087 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-26 21:10:49 +00:00
blois@google.com 463e990434 Revert "With the collections deriving from ListBase, we no longer need to implement a number of boiler-plate methods."
This reverts commit http://code.google.com/p/dart/source/detail?r=21848.

BUG=

Review URL: https://codereview.chromium.org//13934019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21852 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 22:54:33 +00:00
blois@google.com 3dc436c463 With the collections deriving from ListBase, we no longer need to implement a number of boiler-plate methods.
There are some gotchas with Element and Node lists as they may mutate the list being passed in if it's a nodelist as well, so I'm keeping those unimplemented.

In some cases this may fall back to less efficient operations (such as the WrappedList which no longer forwards every method), but I tried to keep all of the primary cases fast and I believe that these methods would fall back to generic implementations anyways in all cases where we use the classes.

BUG=

Review URL: https://codereview.chromium.org//13852008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21848 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 22:29:05 +00:00
efortuna@google.com 5c0ae732b4 Add back localName and improve toString for Html nodes.
BUG=

Review URL: https://codereview.chromium.org//13744003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21105 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 19:29:10 +00:00
efortuna@google.com a46b113afd Make html lists print a nice toString method.
BUG=

Review URL: https://codereview.chromium.org//13704017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21010 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 23:53:35 +00:00
lrn@google.com 3b13f62170 Remove addLast from List.
The List.addLast method has been deprecated for quite a while.
A recent change removed it from the interface, but left the
implementation in place (which caused some errors from the analyzer).
This removes it completely.

Review URL: https://codereview.chromium.org//13528004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20857 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 12:52:19 +00:00
blois@google.com 1fa1a541df Adding tests for Element & Node lists insert method.
BUG=

Review URL: https://codereview.chromium.org//12407005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20129 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 23:58:06 +00:00
lrn@google.com 844cd39fad Change getRange to sublist. Make getRange deprecated.
This changes the exception behavior of getRange. It used to accept
a length of zero, no matter what start value. Now the start value
must be a valid list index.

Review URL: https://codereview.chromium.org//12817003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20064 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 09:15:39 +00:00
blois@google.com 7119f07f96 Fixing Node.nodes.first.
Was throwing an incorrect exception because the JS type was being annotated as non-null.

BUG=9070

Review URL: https://codereview.chromium.org//12513010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19834 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 00:59:02 +00:00
blois@google.com 118fa93da7 BUG=
Review URL: https://codereview.chromium.org//12596004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19804 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 16:40:01 +00:00
blois@google.com 69121021e2 Fixing node_test on IE10.
Previously these tests were not in a group and were getting skipped, but when I fixed that this test started failing.

It appears that IE10 returns false for Node.contains when checking other nodes.

BUG=

Review URL: https://codereview.chromium.org//12557002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19594 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 01:23:45 +00:00
blois@google.com 40e5bd7d28 Adding Node.insertAllBefore
Also addressing some late feedback from Node.nodes.addAll.

BUG=8882

Review URL: https://codereview.chromium.org//12374060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19593 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 00:43:53 +00:00
blois@google.com 8123bf9175 Fixing node.nodes.addAll to accept node lists.
Had two options- change the iterators or do a defensive copy. I believe this is a fairly performance-critical area, so tried to optimize for that.

BUG=6684

Review URL: https://codereview.chromium.org//12271004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18545 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 22:07:05 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
blois@google.com 5690418a11 Fixing a bunch of dartc errors in dart:html tests.
BUG=

Review URL: https://codereview.chromium.org//11644061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16413 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 01:38:08 +00:00
blois@google.com 759bece562 Dartifying SVG library class names.
This CL is based on my previous CL to split out the SVG library.

Basically it renames most classes, but because of some name conflicts around Element and Document, I've skipped those. Renaming those classes will require some sizable changes to the generation code to emit library prefixes when referencing types across libs.

BUG=

Review URL: https://codereview.chromium.org//11364186

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15107 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 20:38:13 +00:00
blois@google.com ed44b9285d Splitting SVG types out of dart:html.
Beyond this CL I need to remove the SVG prefix for most of the classes, but this is an additional chunk of work.

Review URL: https://codereview.chromium.org//11398002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14808 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 21:15:06 +00:00
efortuna@google.com 4a23980c8a Take 2 of splitting html tests into subtests. Had to make two changes to drt to
fully work.
Review URL: https://codereview.chromium.org//11368128

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14703 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 18:54:14 +00:00
efortuna@google.com 868b439bc4 Revert run large html tests individually.
Review URL: https://codereview.chromium.org//11406002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14667 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 00:11:09 +00:00
efortuna@google.com 3476d1c528 Run large html tests individually.
Review URL: https://codereview.chromium.org//11293019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14663 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-07 23:42:50 +00:00
gram@google.com 981c4b11df Restructure pkg/unittest and pkg/webdriver to follow the pub conventions.
This means all imports of unittest in our test code had to change to include 'lib' in the path.
While doing that change I changed the library/imports to the new syntax in the affected files.
Review URL: https://codereview.chromium.org//11301046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14443 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 23:09:47 +00:00
gram@google.com f7d27f2c64 Modified unittest to use new argument syntax.
Fix affected unit tests.
Clean up unit tests that are using Expect instead of expect.
Get rid of warnings about duplicated library names.
Review URL: https://codereview.chromium.org//11275054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14158 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-26 22:52:03 +00:00
floitsch@google.com 3300f91153 Make first and last getters.
Review URL: https://codereview.chromium.org//11273041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14082 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 15:19:31 +00:00
floitsch@google.com 09f6d09d88 Make isEmpty a getter.
Review URL: https://codereview.chromium.org//11238035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14022 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 15:04:32 +00:00
antonm@google.com e52d6a4077 Modify and enable formerly disabled test.
R=vsm@google.com

Review URL: https://codereview.chromium.org//11194031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13747 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 17:20:39 +00:00
blois@google.com f36360ec8b Converting NodeList to List<Node>.
This keeps the NodeList class because other classes depend on it (notably RadioNodeList), but converts all APIs over to List<Node>.

BUG=2712

Review URL: https://codereview.chromium.org//11055009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13188 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-03 17:47:48 +00:00
blois@google.com 1919b5a3ad Removing ElementList.
This includes fixes to make it work properly on Dartium checked (_ChildrenElementList.filter and _FrozenElementList.filter no longer use typed lists).

BUG=2712

Review URL: https://codereview.chromium.org//11016015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13133 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 19:51:08 +00:00
blois@google.com c6c2918caf Revert "Removing ElementList (splitting out removing NodeList into a separate CL)."
This reverts commit 13076 because of issues with queryAll in checked mode.

TBR=vsm
BUG=

Review URL: https://codereview.chromium.org//11033007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13083 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 19:03:57 +00:00
blois@google.com 2d71772ff0 Removing ElementList (splitting out removing NodeList into a separate CL).
BUG=2712

Review URL: https://codereview.chromium.org//10979063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13076 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 17:52:52 +00:00
antonm@google.com f527595489 Roll Chrome forward.
TBR=podivilov@chromium.org

Review URL: https://codereview.chromium.org//10993003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12833 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 10:18:16 +00:00
efortuna@google.com 9163dfe93c revert 1204. Will investigate when I get a chance.
TBR=rnystrom
Review URL: https://codereview.chromium.org//10928216

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12413 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-15 01:21:41 +00:00
rnystrom@google.com 383488ec4f Update unittest to new package layout.
Review URL: https://codereview.chromium.org//10917275

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12404 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-14 21:12:17 +00:00
rnystrom@google.com 659a57df3e Revert "Make unittest follow the new package layout."
This reverts commit 38f7d16f373832a7bf889192af7845cb602aec01.

Review URL: https://codereview.chromium.org//10911318

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12400 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-14 19:43:10 +00:00
rnystrom@google.com 2ba81033a6 Make unittest follow the new package layout.
Review URL: https://codereview.chromium.org//10918240

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12396 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-14 18:22:24 +00:00
dgrove@google.com c265902bea Move unittest from lib to pkg.
Review URL: https://chromiumcodereview.appspot.com//10836241

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10685 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 22:36:59 +00:00
sigmund@google.com daef678742 test renaming overhaul: step 4 client tests
Review URL: https://chromiumcodereview.appspot.com//10191033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7041 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 20:09:35 +00:00