Commit Graph

319 Commits

Author SHA1 Message Date
floitsch@google.com 34d86168b4 Mark periodic4-test as flaky and add debug information.
Review URL: https://codereview.chromium.org//13541002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20868 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 15:33:29 +00:00
floitsch@google.com 8c4cb66a14 Make stream_periodic4_test more resilient against computer loads.
BUG= http://dartbug.com/9367

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20849 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 12:06:48 +00:00
floitsch@google.com a104ba2d4b Give VM a millisecond safety margin for the test.
Review URL: https://codereview.chromium.org//13008020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20384 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 15:46:07 +00:00
ager@google.com e3b397457f Increase the allowed heap size for slow consumer test. We hit the limit in dartium x64 checked mode.
R=lrn@google.com
BUG=dartbug.com/9345

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20369 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 09:18:39 +00:00
floitsch@google.com ab09c261fe Add safetymargin.
Review URL: https://codereview.chromium.org//12617013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20225 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 18:04:19 +00:00
floitsch@google.com 789a144672 Add margin to browser tests and not VM...
Review URL: https://codereview.chromium.org//12516012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20212 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 15:57:27 +00:00
floitsch@google.com 88dc9f5d8c Add safetymargin for timer tests in browsers.
Review URL: https://codereview.chromium.org//12855003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20209 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 15:13:30 +00:00
floitsch@google.com 61b307fb6a Move timer tests to async tests.
Review URL: https://codereview.chromium.org//12812014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20203 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 13:20:35 +00:00
ricow@google.com 10ba4e37fb Remove time dependent part of test
This is flaking
Review URL: https://codereview.chromium.org//12706014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20158 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-18 13:55:55 +00:00
floitsch@google.com 05905fd4b6 Add Stream.periodic.
BUG= http://dartbug.com/8477

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20021 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 13:43:35 +00:00
floitsch@google.com 65718c56df Rename XMatching to XWhere.
For example firstMatching -> firstWhere.

BUG= http://dartbug.com/8664
BUG= http://dartbug.com/8337

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19880 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 17:34:49 +00:00
floitsch@google.com cf677c0513 Update status file.
Review URL: https://codereview.chromium.org//12554008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19771 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 10:34:12 +00:00
floitsch@google.com cf605283e2 Add first version of runAsync.
Review URL: https://codereview.chromium.org//12380060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19768 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 10:08:28 +00:00
floitsch@google.com 5dc8107c53 Revert "Remove Expect from core library."
This reverts commit 19755.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com 12dbd2fd70 Remove Expect from core library.
Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00
floitsch@google.com dd48256fe5 Remove deprecated StringBuffer.add, addAll and addCharCode.
Review URL: https://codereview.chromium.org//12473003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19690 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 13:07:18 +00:00
lrn@google.com bead146749 Renamed StreamSink to EventSink. Renamed signalError to addError.
Review URL: https://codereview.chromium.org//12610006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19683 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 11:31:19 +00:00
ajohnsen@google.com 2d48e3d8e8 Re-enable slow_consumer* tests, now stream pausing behave as expected.
To enable slow_consumer2_test to run on x64, double the heap size.

BUG=https://code.google.com/p/dart/issues/detail?id=7726,https://code.google.com/p/dart/issues/detail?id=8647

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19620 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 13:19:36 +00:00
lrn@google.com 1648ec1e12 Another test that cancels a timer.
Review URL: https://codereview.chromium.org//12391059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19385 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 13:48:52 +00:00
lrn@google.com 4d30b1bbbe Split stream_state_test into three files.
The test "framework" is in a file of its own, and the tests are
split into those that uses timers greater than zero (which doesn't
work on d8) and the rest.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19381 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 13:23:43 +00:00
lrn@google.com eb90412c66 Change and structure how Stream implementations do callbacks.
Callbacks are the on-pause/subscription-state change calls from a stream.

Now a callback is an atomic operation. State changes happening during a callback
will not trigger a new callback before the old one is done. If the state is
changed during the callback, another callback will follow immediately.

Firing of events is also atomic, so a callback will not happend during an event
being fired, but will be triggered afterwards if the state was changed by the
event handlers.

A stream controller (or any other listener for callbacks) will not be told
immediately if a paused stream is resumed. If there are pending events in the
queue, those will be fired before the controller is considerered resumed.

A canceled subscription will immediately stop getting events.
Previously it would get the current event being fired, but it's more rational
to not get events after you have said you don't want them, instead of having
the handlers have to discard events after a cancel.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19379 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 11:53:12 +00:00
lrn@google.com 8806250918 Fix for issue 8311.
Fix bad state in done-handler of event-transform-stream

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19215 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 12:18:40 +00:00
lrn@google.com 96412ca371 Fix mising rename in tests of Future.isCompleted.
Review URL: https://codereview.chromium.org//12387012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19212 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 11:54:19 +00:00
lrn@google.com cd4ae7e4af Add test for whether a completer or stream controller has been closed.
BUG=http://dartbug.com/8638

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19211 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 11:36:54 +00:00
nweiz@google.com 987dc18324 Make sure Future.forEach properly pipes exceptions.
BUG=8817

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19164 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 19:22:27 +00:00
lrn@google.com 6b4f4b1bab Change new List(n) to return fixed length list.
Deprecate List.fixedLength, add List.filled.

Make Iterable.toList and List.from take "growable" argument,
defaulting to false.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
lrn@google.com 247601ab57 Increase size for slow-consumer test (overflows memory on X64).
Address comments from previous commit.
Make recursive callbacks from a Stream work correctly.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18753 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 13:21:32 +00:00
lrn@google.com 0b84212bc3 Change Stream callbacks.
During a stat-change callback, events can't be fired. Any events added will be delayed.

When both the subscription state and the pause state has changed in a single operation, only the subscription state change callback is called.

After calling _close on a Stream (close on a StreamController/scheduling a Done event), the pause-state change callback will no longer be called. All necessary pause handling will be done internally in the Stream, since the stream controller can't add any new events anyway.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18748 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 12:45:43 +00:00
ahe@google.com 25c6dedd61 Skeleton API for lazy library loading.
Review URL: https://codereview.chromium.org//11784018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18637 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-18 15:32:22 +00:00
lrn@google.com 03f5a66836 Recommit changing List.skip/take/revert returns Iterable and remove mappedBy.
This reverts r18591.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18615 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-18 10:35:51 +00:00
rnystrom@google.com 0e0473d33a Unbreak pub:
Revert "Make List.skip, List.take and List.reversed return Iterables, not Lists."

This reverts commit 44c3745a76acfad3d1d5bfc7a8b8c8e2def30e09.

Revert "Remove deprecated mappedBy."

This reverts commit 779ab69eab73e5e349245e99560b18955908e0cc.

BUG=dartbug.com/8560

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18591 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 18:38:42 +00:00
floitsch@google.com 0672317bec Remove deprecated mappedBy.
Committed: https://code.google.com/p/dart/source/detail?r=18575
Reverted: http://code.google.com/p/dart/source/detail?r=18576

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18579 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 13:57:18 +00:00
floitsch@google.com ad839e6957 Revert "Remove deprecated mappedBy."
This reverts commit 18575.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18576 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 13:23:22 +00:00
floitsch@google.com b37100770b Remove deprecated mappedBy.
Review URL: https://codereview.chromium.org//12212213

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18575 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 13:18:17 +00:00
floitsch@google.com 02a5b031fe Change Future.delayed to take a Duration.
Review URL: https://codereview.chromium.org//12224081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18471 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 19:31:22 +00:00
floitsch@google.com 3f7146707d Rework Timer interface.
Review URL: https://codereview.chromium.org//12213092

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18326 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 19:22:16 +00:00
lrn@google.com 0e6cc375c4 Fix bad handling of done events in _ForwardingStream.
On a done event, the subscription is stale, but the forwarding
stream uses the presence of the subscription as a state-marker for
it being useful. Changed to null the subscription on a done event.

BUG=http://dartbug.com/8311

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18212 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 10:17:05 +00:00
floitsch@google.com cb10990e5a Remove Sink and move CollectionSink to async.
Committed: https://code.google.com/p/dart/source/detail?r=18063
Reverted: https://code.google.com/p/dart/source/detail?r=18067

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18144 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 15:32:18 +00:00
floitsch@google.com cb1bff12b6 Revert "Remove Sink and move CollectionSink to async."
This reverts commit 18063.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18067 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 19:30:15 +00:00
floitsch@google.com 02f6b1835d Remove Sink and move CollectionSink to async.
Review URL: https://codereview.chromium.org//12154006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18063 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 19:03:55 +00:00
lrn@google.com 11c5bd3d11 Add Future.of that calls a function and captures the result
This makes
  new Future.of(func)
equivalent to
  new Future.immediate(null).then((_) => func())
which should kill that idiom.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17979 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 13:15:42 +00:00
lrn@google.com 9b23dff467 Reapply "Rename mappedBy to map."
This reverts commit r17907.

TBR.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17918 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 15:12:56 +00:00
floitsch@google.com b1a118d5ce Revert "Rename mappedBy to map."
This reverts commit 17899.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17907 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 14:02:27 +00:00
lrn@google.com 0dc2f4b1ba Rename mappedBy to map.
Retain a deprecated mappedBy for now.
Change return type of mappedBy, skip and take on List to Iterable.

BUG= http://dartbug.com/8063
BUG= http://dartbug.com/8064
BUG= http://dartbug.com/6739
BUG= http://dartbug.com/7982

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17899 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 12:37:13 +00:00
lrn@google.com 81683c5364 Remove Stream.cyclic/superceding.
Review URL: https://codereview.chromium.org//12088069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17837 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 11:36:44 +00:00
lrn@google.com df8d47e895 Fix various warnings from the analyzer.
Review URL: https://codereview.chromium.org//12089066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17836 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 11:35:29 +00:00
lrn@google.com bdce730fb2 Remove transformEvents and make StreamEventTransformer extend StreamTransformer.
Make a StreamEventTransformer the default for the StreamTransformer
factory constructor, and remove the old implementation.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17761 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 14:04:26 +00:00
lrn@google.com b79eee44dc Fix code to not hit bug in dart2js.
Also add library tag to test. Seems to be required.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17751 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 10:19:22 +00:00
lrn@google.com 7fc981b3a6 Add public-facing method and class that allows intercepting stream events.
This allows intercepting events at the subscription level instead of creating
a new full stream and adding the events to that.

Also fix a number of typos and bugs detected by analyzer.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17746 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 08:43:15 +00:00
lrn@google.com 1f05296600 Change singleSubscription/multiSubscription to normal/broadcast.
Also make StreamController not a Stream.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17563 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 13:30:27 +00:00