Commit Graph

7957 Commits

Author SHA1 Message Date
Emily Stark
c287a6b3ab Add contributors list release/0.8.3-rc0 2014-07-18 10:22:49 -07:00
Emily Stark
d3d3e129ed History pass release/automated-tests-test 2014-07-18 10:09:50 -07:00
David Greenspan
0ba651a79b Don’t create Connection until livedata test runs
for “livedata - publisher errors”
2014-07-17 19:10:54 -07:00
David Glasser
8e005cadd3 Fix oplog error "Buffer inexplicably empty"
We were violating the contract "buffer is never empty in STEADY phase
unless everything matching fits into published", which is maintained by
_removeBuffered, by moving something from _unpublishedBuffer without
going through _removeBuffered.

Specifically, if we had already set _safeAppendToBuffer to
false (because we knew of some matching document below buffer) and did a
modification to a document in buffer, we could leave buffer empty
without triggering a repoll.

Fixes #2274.
2014-07-16 20:13:25 -07:00
David Greenspan
c8d7821deb Uncommitted change for 2e191e0 2014-07-16 16:28:54 -07:00
David Glasser
c05ae240af Test that reverting df2820 fixed #2275.
Make some instances of #2315 into errors instead of silent early
returns.

Specifically, observeChanges calls (with added or addedBefore callbacks)
from within another observeChanges callback on the same collection will
be unable to differentiate between initial and later added/addedBefore
calls, which is serious enough to be an error (see #2315 for details).

We don't currently think that the other effect of #2315 (where observe
callbacks triggered by insert/remove/update/resumeObservers will not
occur before those methods return, if they are called reentrantly) is
problematic enough to deserve this sort of error.
2014-07-16 16:07:18 -07:00
David Glasser
61667d6d94 Revert "Only do one query for forEach/count in Deps"
This reverts commit df2820ffd9.
2014-07-16 16:07:18 -07:00
David Greenspan
2e191e0b09 Add regression tests for d56d9da
Make sure inclusions with one path segment like “..” and “foo” (where foo is in the data context) don’t cause the enclosing template to re-render when the data context changes.
2014-07-16 15:06:20 -07:00
David Greenspan
31fc5b0887 Add textarea parse tests
Test for bugs reported by Andrew and Vincent, concerning parsing of dynamic attributes and contents of textarea.
2014-07-16 14:04:12 -07:00
David Greenspan
88acf81b08 Log fewer “no heartbeat” messages in tests
Don’t log them for stub streams.

In livedata_connection, fire the onConnected callback *after* we have set up the stream, so we don’t set up a stream that has just been disconnected!
2014-07-15 18:22:43 -07:00
Emily Stark
87688f1a19 Clean up stream disconnect tests.
Make sure we always call the `expect` function, even if we fail. That
gives us a nice failure message instead of "Async batch timed out".

Make sure we close the stream in each test if we fail. Previously, in
some IEs, a "basic disconnect" timeout without closing the stream seems
to cause a somewhat random subset of other tests to time out or
fail. (Possibly a per-domain connection limit?)
2014-07-15 18:01:39 -07:00
David Greenspan
8e93519f5c Make test-in-browser show current client test 2014-07-15 17:10:46 -07:00
David Greenspan
01d538fc37 Prevent error in console when running tests 2014-07-15 16:45:32 -07:00
David Greenspan
4f15a3d702 Fix Parties on IE9 by not using parentElement
Using parentElement instead of parentNode was probably a typo.  I didn’t even know there was an Element#parentElement alongside Node#parentNode in the DOM, but apparently there is, and apparently IE 9 supports it, but for some reason it doesn’t work.

The lesson is: never use parentElement on a DOM node.  Use parentNode and be done with it.
2014-07-15 15:33:09 -07:00
David Greenspan
b5cbca980e Throw errors in {{foo bar}}, foo not a function
Fix the “simpler helper” test and expand the cases where we detect that “foo” is missing or not a function (e.g. is a scalar property of the data context).
2014-07-15 14:20:44 -07:00
Emily Stark
2a382cfb8c Update canonicalizeHtml list of DOMRange/DOMBackend element properties.
Fixes "ui hooks - nested domrange" test in IE8.
2014-07-15 13:33:00 -07:00
Emily Stark
12c60075a2 Fix parentNode check to decide whether to call a moveElement UI hook.
IE8 sets an element's `parentNode` to an HTMLDocument at funny times
even when the element hasn't been added to the DOM (like if you add a
child to the element), so a check for falsey sometimes misleads us into
thinking that the element is in the DOM when it's not (and thus calling
a moveElement UI hook for an element that was never inserted).

The corresponding check on `removeElementWithHooks` is okay, because if
the element's parentNode is an HTMLDocument, we won't find a ui hook to
call (unless you for some reason added ui hooks to the HTMLDocument).

Fixes "ui hooks" test in IE8.
2014-07-15 13:31:52 -07:00
David Greenspan
ab9cae6123 Fix Vincent’s textarea bug
Textarea would get same content as previous tag in a template, because the variable wasn’t cleared!

Needs test
2014-07-14 20:04:12 -07:00
Emily Stark
6112c2ddc1 Remove Array.prototype.slice.call on a NodeList.
It breaks in IE8.
2014-07-14 18:00:29 -07:00
David Greenspan
924f379870 Fix textarea HTML parsing
In modifying getContent, we neglected the fact that parseAttrs wraps arrays in HTML.Attrs.  Now we wrap arrays outside of parseAttrs near the code that modifies the attributes array for textarea contents.

Needs tests
2014-07-14 16:36:28 -07:00
Emily Stark
019736096b tinytest: don't pass msg.fields into _.has if it's falsey. 2014-07-14 15:28:03 -07:00
Emily Stark
8236854736 Use window.opener in OAuth flow only when localStorage doesn't work.
Move OAuth._endOfLoginResponse HTML/JS into asset instead of piecing it
together inline.

Fixes #2302.
2014-07-14 14:58:07 -07:00
Justin SB
c1795221ac Tolerate repeated test reports in tinytest
This fixes the status bar, which was otherwise double-counting repeated reports
2014-07-14 14:21:57 -07:00
Justin SB
2ac9da43f9 tinytest/run now returns immediatedly; sends a 'complete' record when finished
Otherwise the DDP call to tinytest/run was blocking client test execution,
in particular Accounts DDP calls won't run concurrently with another DDP call,
even if the first DDP call calls unblock.
2014-07-14 13:44:41 -07:00
David Greenspan
57465b00c2 Handle textarea edge case slightly more gracefully
and tests
2014-07-13 11:30:32 -07:00
David Greenspan
3b86b5c11f Suppress an error message from tests 2014-07-13 11:30:32 -07:00
Emily Stark
a186c961cf Add semicolon to OAuth end-of-login response 2014-07-11 16:18:41 -07:00
David Greenspan
d56d9daed9 Fix view.lookup to not take dependencies
The template compiler assumes that single-segment paths like {{foo}}, compiled into view.lookup(“foo”), don’t take dependencies, returning a function if there is anything reactive going on.  We violated that in the Blaze refactor, meaning that #with might re-render its contents when its argument changes!

Tests to add:
* UI.dynamic doesn’t re-create template when enclosing data context changes.
* UI.dynamic doesn’t re-create template when “data” argument changes
* Coverage for the “..” and “foo” cases in lookup.js

Tests to fix: “simple helper”
2014-07-11 08:29:07 -07:00
David Greenspan
c18ea3c721 Add view.renderCount 2014-07-11 08:29:07 -07:00
Nick Martin
591263fbf1 Merge branch 'pr-2300' into devel 2014-07-10 16:31:22 -07:00
Nick Martin
4079791530 Update history for #2299. 2014-07-10 16:31:12 -07:00
Zoltan Olah
ef70b6bfd2 Replaced process.nextTick with setImmediate in _SynchronousQueue 2014-07-10 16:31:12 -07:00
David Greenspan
e970d5381d Merge branch 'blaze-refactor' into devel
Conflicts:
	packages/spacebars-tests/template_tests.html
	packages/spacebars-tests/template_tests.js
	packages/ui/render.js
2014-07-10 16:29:20 -07:00
David Greenspan
750d2aa861 Fix compile output tests in Firefox 12 with Coffee 2014-07-10 14:02:14 -07:00
David Greenspan
3cc4e230ff More View comments 2014-07-10 14:01:34 -07:00
David Greenspan
2c3899f0e8 Have instantiateBody use Blaze.render per Arunoda 2014-07-09 17:31:38 -07:00
David Greenspan
3a2207a5c4 Add comment and fix indentation 2014-07-09 17:30:40 -07:00
Chris Mather
59d3e31e13 Fix Meteor._inherits to copy Parent static properties
Problem:
Static properties of the parent function ("class") were not copied to the child
function as expected. This is because the _.each underscore helper does not
propertly iterate over function properties.

Solution:
Don't use _.each to copy parent properties to the child function. Instead,
iterate directly and copy hasOwn properties to the child function.

An alternative solution is to make the _.each helper work properly with
functions in the underscore package.
2014-07-09 15:01:31 -07:00
Emily Stark
3d058ad5ab Make <a> tags SVG elements when they have xlink:href.
Fixes #2178.
2014-07-09 11:40:22 -07:00
Maria Pacana
ecb366f62e Revised wording about Manual on docs page. 2014-07-08 18:56:02 -07:00
Maria Pacana
478899c4d3 Added links to Meteor Manual on docs page. 2014-07-08 18:40:26 -07:00
David Greenspan
1dbe352aa3 Start commenting Blaze.View 2014-07-08 14:01:32 -07:00
David Greenspan
379dcab8f2 Move Blaze._addEventMap to end of view.js 2014-07-08 13:16:02 -07:00
David Greenspan
fe1cd72a8e Document UI.remove
Also tweak the warning about non-jQuery removals
2014-07-08 13:13:05 -07:00
David Greenspan
8afc41f0ef Remove mentions of “Component” from docs
“instantiated component” -> “rendered template”
2014-07-08 12:18:13 -07:00
David Greenspan
5f5623a05d Fix showdown package (and docs) release/blaze-refactor-rc2 2014-07-07 16:23:14 -07:00
David Greenspan
db36619408 Fix line endings in showdown.js
The DOS line endings were messing up Chrome dev tools
2014-07-07 15:57:01 -07:00
David Greenspan
d8c36e4605 Moar tests (and focus/blur shenanigans) 2014-07-07 12:24:06 -07:00
David Greenspan
072ef0a23d Test focus and blur event cleanup 2014-07-07 11:56:11 -07:00
Emily Stark
d962d498c8 Remove more SRP from docs 2014-07-07 11:45:03 -07:00