Commit Graph

7978 Commits

Author SHA1 Message Date
Emily Stark
1b866b729d Try window.opener first in OAuth popup, then localStorage.
We've occasionally seen weird configurations of IE where localStorage
isn't shared between same-origin windows, so trying window.opener first
is safer.
release/0.8.3-rc5
2014-07-25 17:24:32 -07:00
Emily Stark
189116a65b History tweaks 2014-07-25 16:19:47 -07:00
Emily Stark
0f1e310a10 Test return value and argument of this.autorun 2014-07-25 16:19:47 -07:00
David Greenspan
df6e70320a Update History.md (template autorun) 2014-07-25 16:14:25 -07:00
David Greenspan
6ec8f05e4c Docs changes for 0.8.3 2014-07-25 16:07:16 -07:00
Emily Stark
1ac501784a Add test for this.autorun release/0.8.3-rc4 2014-07-25 15:05:38 -07:00
David Greenspan
416b0170d7 Simplify UI.dynamic 2014-07-25 15:01:00 -07:00
David Greenspan
0cc2624c59 Fix #2339 (dynamic attributes on textareas) 2014-07-25 14:23:44 -07:00
Emily Stark
c715613e48 Add sketchy fallback for flaky window.close() in OAuth popup.
Using an onerror event handler looks like the only semi-reliable way to
be able to close the popup in iOS Chrome, even though it's almost
certainly a bug that this works. We'll replace it soon with
redirect-based OAuth.
2014-07-25 14:11:39 -07:00
David Greenspan
adeb649bf6 Fix Blaze.currentView in event handlers
with test
2014-07-25 13:57:47 -07:00
Emily Stark
abbf3c78fa shrinkwrap update release/0.8.3-rc3 2014-07-25 08:20:33 -07:00
Emily Stark
631e9aab73 Update canonicalizeHtml for 0fd348a.
Makes tests pass in IE8. Maybe 0fd348a should have been used <!--IE-->
as the placeholder?
2014-07-24 22:21:46 -07:00
David Greenspan
fa28ac2cbc Add template instance “this.autorun”
Needs docs
2014-07-24 18:34:34 -07:00
David Greenspan
f0fd348afe Don’t use empty text node placeholders in IE 8
It’s a long story.  See comment.
2014-07-24 18:30:43 -07:00
Emily Stark
9c37a00653 Remove history note for c05ae240a, which has been reverted 2014-07-21 11:07:13 -07:00
Emily Stark
78d08b5537 Revert part of "Test that reverting df2820 fixed #2275."
This reverts commit c05ae240af EXCEPT for
the "fetch in observe" test, which I'm leaving in because we still want
a test for #2275.

This commit made it an error to start an observeChanges from within an
observeChanges callback for the same collection, but it turns out that
this is actually a somewhat common thing to do (for example, nested
'each'). Instead, we'll leave things the way they were pre-0.8.2: you
can start an observeChanges from within an observeChanges callback, but
it'll be subtly buggy in that you won't get synchronous 'added'
callbacks. This issue is described in #2315, along with the fact that
insert/update/remove/resumeObservers won't run their affected observe
callbacks if they are called from within a task on the collection's
queue. Eventually we'll implement the full fix (which relaxes the
requirement that insert/update/remove run all their callbacks before
returning) described in #2315.
release/0.8.3-rc2
2014-07-21 10:56:08 -07:00
Emily Stark
d3eae5a2e8 Make a trivial change to oauth to force new package version.
Linux build of rc0's oauth package seems to have disappeared from s3, so
forcing a new oauth version to be published.
release/download-0.8.3-packages-test-5 release/0.8.3-rc1
2014-07-20 21:16:33 -07:00
Emily Stark
c52ca68ea2 Add note about #2315 and c05ae2 to History release/download-test-0.8.3 2014-07-19 17:04:29 -07:00
Slava Kim
105c768628 Add a note about Blaze supporting different cursors for #each 2014-07-18 17:10:29 -07:00
David Greenspan
7ba1d23193 more History.md 2014-07-18 16:46:16 -07:00
Emily Stark
2c76a9e886 Add a sentence about blaze-refactor to history 2014-07-18 16:25:33 -07:00
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