ember-source 1.9.0.beta.4 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ember-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +57 -43
- data/dist/ember-testing.js +26 -18
- data/dist/ember-tests.js +160 -24
- data/dist/ember-tests.prod.js +160 -24
- data/dist/ember.js +79 -46
- data/dist/ember.min.js +10 -10
- data/dist/ember.prod.js +79 -46
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 052a33bf10608f0891d002cb22da0449771e6ee4
|
4
|
+
data.tar.gz: 95242bb387162aad053a261983d7e21afadf8c43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9666eda04adfed94fb303c9a9e0dbc3440a4baf0c615f82d85b754f6d60fa561d07f494ab5268692c48a9422427b009e04385d12182875aae36551be14a25c6d
|
7
|
+
data.tar.gz: 4446210ec7e20ca347fda37bc7eddbacd011e4dee854e0661e695acc9ead25462e676005326f40acbc1b3e64ee6c3a02e81f5ac1cc0f0e4f9e547f861a539005
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.9.0
|
1
|
+
1.9.0
|
data/dist/ember-runtime.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 1.9.0
|
8
|
+
* @version 1.9.0
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -14,6 +14,7 @@ var define, requireModule, require, requirejs, Ember;
|
|
14
14
|
(function() {
|
15
15
|
Ember = this.Ember = this.Ember || {};
|
16
16
|
if (typeof Ember === 'undefined') { Ember = {}; };
|
17
|
+
function UNDEFINED() { }
|
17
18
|
|
18
19
|
if (typeof Ember.__loader === 'undefined') {
|
19
20
|
var registry = {}, seen = {};
|
@@ -23,7 +24,11 @@ var define, requireModule, require, requirejs, Ember;
|
|
23
24
|
};
|
24
25
|
|
25
26
|
requirejs = require = requireModule = function(name) {
|
26
|
-
|
27
|
+
var s = seen[name];
|
28
|
+
|
29
|
+
if (s !== undefined) { return seen[name]; }
|
30
|
+
if (s === UNDEFINED) { return undefined; }
|
31
|
+
|
27
32
|
seen[name] = {};
|
28
33
|
|
29
34
|
if (!registry[name]) {
|
@@ -35,34 +40,37 @@ var define, requireModule, require, requirejs, Ember;
|
|
35
40
|
var callback = mod.callback;
|
36
41
|
var reified = [];
|
37
42
|
var exports;
|
43
|
+
var length = deps.length;
|
38
44
|
|
39
|
-
for (var i=0
|
45
|
+
for (var i=0; i<length; i++) {
|
40
46
|
if (deps[i] === 'exports') {
|
41
47
|
reified.push(exports = {});
|
42
48
|
} else {
|
43
|
-
reified.push(requireModule(resolve(deps[i])));
|
49
|
+
reified.push(requireModule(resolve(deps[i], name)));
|
44
50
|
}
|
45
51
|
}
|
46
52
|
|
47
|
-
var value = callback.apply(this, reified);
|
48
|
-
return seen[name] = exports || value;
|
53
|
+
var value = length === 0 ? callback.call(this) : callback.apply(this, reified);
|
49
54
|
|
50
|
-
|
51
|
-
|
52
|
-
var parts = child.split("/");
|
53
|
-
var parentBase = name.split("/").slice(0, -1);
|
55
|
+
return seen[name] = exports || (value === undefined ? UNDEFINED : value);
|
56
|
+
};
|
54
57
|
|
55
|
-
|
56
|
-
|
58
|
+
function resolve(child, name) {
|
59
|
+
if (child.charAt(0) !== '.') { return child; }
|
60
|
+
var parts = child.split("/");
|
61
|
+
var parentBase = name.split("/").slice(0, -1);
|
57
62
|
|
58
|
-
|
59
|
-
|
60
|
-
else { parentBase.push(part); }
|
61
|
-
}
|
63
|
+
for (var i=0, l=parts.length; i<l; i++) {
|
64
|
+
var part = parts[i];
|
62
65
|
|
63
|
-
|
66
|
+
if (part === '..') { parentBase.pop(); }
|
67
|
+
else if (part === '.') { continue; }
|
68
|
+
else { parentBase.push(part); }
|
64
69
|
}
|
65
|
-
|
70
|
+
|
71
|
+
return parentBase.join("/");
|
72
|
+
}
|
73
|
+
|
66
74
|
requirejs._eak_seen = registry;
|
67
75
|
|
68
76
|
Ember.__loader = {define: define, require: require, registry: registry};
|
@@ -4803,7 +4811,7 @@ define("ember-metal/core",
|
|
4803
4811
|
|
4804
4812
|
@class Ember
|
4805
4813
|
@static
|
4806
|
-
@version 1.9.0
|
4814
|
+
@version 1.9.0
|
4807
4815
|
*/
|
4808
4816
|
|
4809
4817
|
if ('undefined' === typeof Ember) {
|
@@ -4830,10 +4838,10 @@ define("ember-metal/core",
|
|
4830
4838
|
/**
|
4831
4839
|
@property VERSION
|
4832
4840
|
@type String
|
4833
|
-
@default '1.9.0
|
4841
|
+
@default '1.9.0'
|
4834
4842
|
@static
|
4835
4843
|
*/
|
4836
|
-
Ember.VERSION = '1.9.0
|
4844
|
+
Ember.VERSION = '1.9.0';
|
4837
4845
|
|
4838
4846
|
/**
|
4839
4847
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -9607,34 +9615,40 @@ define("ember-metal/run_loop",
|
|
9607
9615
|
};
|
9608
9616
|
|
9609
9617
|
/**
|
9610
|
-
|
9611
|
-
that
|
9618
|
+
Allows you to specify which context to call the specified function in while
|
9619
|
+
adding the execution of that function to the Ember run loop. This ability
|
9620
|
+
makes this method a great way to asynchronusly integrate third-party libraries
|
9621
|
+
into your Ember application.
|
9612
9622
|
|
9613
|
-
|
9614
|
-
|
9623
|
+
`run.bind` takes two main arguments, the desired context and the function to
|
9624
|
+
invoke in that context. Any additional arguments will be supplied as arguments
|
9625
|
+
to the function that is passed in.
|
9615
9626
|
|
9616
|
-
|
9617
|
-
|
9618
|
-
|
9619
|
-
|
9620
|
-
|
9621
|
-
third-party events and Ember code.
|
9627
|
+
Let's use the creation of a TinyMCE component as an example. Currently,
|
9628
|
+
TinyMCE provides a setup configuration option we can use to do some processing
|
9629
|
+
after the TinyMCE instance is initialized but before it is actually rendered.
|
9630
|
+
We can use that setup option to do some additional setup for our component.
|
9631
|
+
The component itself could look something like the following:
|
9622
9632
|
|
9623
9633
|
```javascript
|
9624
|
-
|
9625
|
-
|
9626
|
-
|
9627
|
-
|
9628
|
-
|
9634
|
+
App.RichTextEditorComponent = Ember.Component.extend({
|
9635
|
+
initializeTinyMCE: function(){
|
9636
|
+
tinymce.init({
|
9637
|
+
selector: '#' + this.$().prop('id'),
|
9638
|
+
setup: Ember.run.bind(this, this.setupEditor)
|
9639
|
+
});
|
9640
|
+
}.on('didInsertElement'),
|
9641
|
+
|
9642
|
+
setupEditor: function(editor) {
|
9643
|
+
this.set('editor', editor);
|
9644
|
+
editor.on('change', function(){ console.log('content changed!')} );
|
9645
|
+
}
|
9629
9646
|
});
|
9630
9647
|
```
|
9631
9648
|
|
9632
|
-
|
9633
|
-
|
9634
|
-
|
9635
|
-
```javascript
|
9636
|
-
jQuery(window).on('resize', run.bind(this, this.handleResize));
|
9637
|
-
```
|
9649
|
+
In this example, we use Ember.run.bind to bind the setupEditor message to the
|
9650
|
+
context of the App.RichTextEditorComponent and to have the invocation of that
|
9651
|
+
method be safely handled and excuted by the Ember run loop.
|
9638
9652
|
|
9639
9653
|
@method bind
|
9640
9654
|
@namespace Ember
|
@@ -9647,7 +9661,7 @@ define("ember-metal/run_loop",
|
|
9647
9661
|
when called within an existing loop, no return value is possible.
|
9648
9662
|
@since 1.4.0
|
9649
9663
|
*/
|
9650
|
-
run.bind = function(target, method /* args*/) {
|
9664
|
+
run.bind = function(target, method /* args */) {
|
9651
9665
|
var args = slice.call(arguments);
|
9652
9666
|
return function() {
|
9653
9667
|
return run.join.apply(run, args.concat(slice.call(arguments)));
|
data/dist/ember-testing.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 1.9.0
|
8
|
+
* @version 1.9.0
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -14,6 +14,7 @@ var enifed, requireModule, eriuqer, requirejs, Ember;
|
|
14
14
|
(function() {
|
15
15
|
Ember = this.Ember = this.Ember || {};
|
16
16
|
if (typeof Ember === 'undefined') { Ember = {}; };
|
17
|
+
function UNDEFINED() { }
|
17
18
|
|
18
19
|
if (typeof Ember.__loader === 'undefined') {
|
19
20
|
var registry = {}, seen = {};
|
@@ -23,7 +24,11 @@ var enifed, requireModule, eriuqer, requirejs, Ember;
|
|
23
24
|
};
|
24
25
|
|
25
26
|
requirejs = eriuqer = requireModule = function(name) {
|
26
|
-
|
27
|
+
var s = seen[name];
|
28
|
+
|
29
|
+
if (s !== undefined) { return seen[name]; }
|
30
|
+
if (s === UNDEFINED) { return undefined; }
|
31
|
+
|
27
32
|
seen[name] = {};
|
28
33
|
|
29
34
|
if (!registry[name]) {
|
@@ -35,34 +40,37 @@ var enifed, requireModule, eriuqer, requirejs, Ember;
|
|
35
40
|
var callback = mod.callback;
|
36
41
|
var reified = [];
|
37
42
|
var exports;
|
43
|
+
var length = deps.length;
|
38
44
|
|
39
|
-
for (var i=0
|
45
|
+
for (var i=0; i<length; i++) {
|
40
46
|
if (deps[i] === 'exports') {
|
41
47
|
reified.push(exports = {});
|
42
48
|
} else {
|
43
|
-
reified.push(requireModule(resolve(deps[i])));
|
49
|
+
reified.push(requireModule(resolve(deps[i], name)));
|
44
50
|
}
|
45
51
|
}
|
46
52
|
|
47
|
-
var value = callback.apply(this, reified);
|
48
|
-
return seen[name] = exports || value;
|
53
|
+
var value = length === 0 ? callback.call(this) : callback.apply(this, reified);
|
49
54
|
|
50
|
-
|
51
|
-
|
52
|
-
var parts = child.split("/");
|
53
|
-
var parentBase = name.split("/").slice(0, -1);
|
55
|
+
return seen[name] = exports || (value === undefined ? UNDEFINED : value);
|
56
|
+
};
|
54
57
|
|
55
|
-
|
56
|
-
|
58
|
+
function resolve(child, name) {
|
59
|
+
if (child.charAt(0) !== '.') { return child; }
|
60
|
+
var parts = child.split("/");
|
61
|
+
var parentBase = name.split("/").slice(0, -1);
|
57
62
|
|
58
|
-
|
59
|
-
|
60
|
-
else { parentBase.push(part); }
|
61
|
-
}
|
63
|
+
for (var i=0, l=parts.length; i<l; i++) {
|
64
|
+
var part = parts[i];
|
62
65
|
|
63
|
-
|
66
|
+
if (part === '..') { parentBase.pop(); }
|
67
|
+
else if (part === '.') { continue; }
|
68
|
+
else { parentBase.push(part); }
|
64
69
|
}
|
65
|
-
|
70
|
+
|
71
|
+
return parentBase.join("/");
|
72
|
+
}
|
73
|
+
|
66
74
|
requirejs._eak_seen = registry;
|
67
75
|
|
68
76
|
Ember.__loader = {define: enifed, require: eriuqer, registry: registry};
|
data/dist/ember-tests.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 1.9.0
|
8
|
+
* @version 1.9.0
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -14,6 +14,7 @@ var enifed, requireModule, eriuqer, requirejs, Ember;
|
|
14
14
|
(function() {
|
15
15
|
Ember = this.Ember = this.Ember || {};
|
16
16
|
if (typeof Ember === 'undefined') { Ember = {}; };
|
17
|
+
function UNDEFINED() { }
|
17
18
|
|
18
19
|
if (typeof Ember.__loader === 'undefined') {
|
19
20
|
var registry = {}, seen = {};
|
@@ -23,7 +24,11 @@ var enifed, requireModule, eriuqer, requirejs, Ember;
|
|
23
24
|
};
|
24
25
|
|
25
26
|
requirejs = eriuqer = requireModule = function(name) {
|
26
|
-
|
27
|
+
var s = seen[name];
|
28
|
+
|
29
|
+
if (s !== undefined) { return seen[name]; }
|
30
|
+
if (s === UNDEFINED) { return undefined; }
|
31
|
+
|
27
32
|
seen[name] = {};
|
28
33
|
|
29
34
|
if (!registry[name]) {
|
@@ -35,34 +40,37 @@ var enifed, requireModule, eriuqer, requirejs, Ember;
|
|
35
40
|
var callback = mod.callback;
|
36
41
|
var reified = [];
|
37
42
|
var exports;
|
43
|
+
var length = deps.length;
|
38
44
|
|
39
|
-
for (var i=0
|
45
|
+
for (var i=0; i<length; i++) {
|
40
46
|
if (deps[i] === 'exports') {
|
41
47
|
reified.push(exports = {});
|
42
48
|
} else {
|
43
|
-
reified.push(requireModule(resolve(deps[i])));
|
49
|
+
reified.push(requireModule(resolve(deps[i], name)));
|
44
50
|
}
|
45
51
|
}
|
46
52
|
|
47
|
-
var value = callback.apply(this, reified);
|
48
|
-
return seen[name] = exports || value;
|
53
|
+
var value = length === 0 ? callback.call(this) : callback.apply(this, reified);
|
49
54
|
|
50
|
-
|
51
|
-
|
52
|
-
var parts = child.split("/");
|
53
|
-
var parentBase = name.split("/").slice(0, -1);
|
55
|
+
return seen[name] = exports || (value === undefined ? UNDEFINED : value);
|
56
|
+
};
|
54
57
|
|
55
|
-
|
56
|
-
|
58
|
+
function resolve(child, name) {
|
59
|
+
if (child.charAt(0) !== '.') { return child; }
|
60
|
+
var parts = child.split("/");
|
61
|
+
var parentBase = name.split("/").slice(0, -1);
|
57
62
|
|
58
|
-
|
59
|
-
|
60
|
-
else { parentBase.push(part); }
|
61
|
-
}
|
63
|
+
for (var i=0, l=parts.length; i<l; i++) {
|
64
|
+
var part = parts[i];
|
62
65
|
|
63
|
-
|
66
|
+
if (part === '..') { parentBase.pop(); }
|
67
|
+
else if (part === '.') { continue; }
|
68
|
+
else { parentBase.push(part); }
|
64
69
|
}
|
65
|
-
|
70
|
+
|
71
|
+
return parentBase.join("/");
|
72
|
+
}
|
73
|
+
|
66
74
|
requirejs._eak_seen = registry;
|
67
75
|
|
68
76
|
Ember.__loader = {define: enifed, require: eriuqer, registry: registry};
|
@@ -7222,6 +7230,14 @@ enifed("ember-handlebars/tests/handlebars_test",
|
|
7222
7230
|
ok(safeString instanceof Handlebars.SafeString, "should return SafeString");
|
7223
7231
|
});
|
7224
7232
|
|
7233
|
+
test("htmlSafe should return an empty string for null", function() {
|
7234
|
+
equal(htmlSafe(null).toString(), "", "should return an empty string");
|
7235
|
+
});
|
7236
|
+
|
7237
|
+
test("htmlSafe should return an empty string for undefined", function() {
|
7238
|
+
equal(htmlSafe().toString(), "", "should return an empty string");
|
7239
|
+
});
|
7240
|
+
|
7225
7241
|
test("should escape HTML in normal mustaches", function() {
|
7226
7242
|
view = EmberView.create({
|
7227
7243
|
template: EmberHandlebars.compile('{{view.output}}'),
|
@@ -27844,6 +27860,31 @@ enifed("ember-routing/tests/system/route_test",
|
|
27844
27860
|
equal(route.modelFor('foo'), foo);
|
27845
27861
|
});
|
27846
27862
|
|
27863
|
+
|
27864
|
+
test(".send just calls an action if the router is absent", function() {
|
27865
|
+
expect(7);
|
27866
|
+
var route = Ember.Route.createWithMixins({
|
27867
|
+
actions: {
|
27868
|
+
returnsTrue: function(foo, bar) {
|
27869
|
+
equal(foo, 1);
|
27870
|
+
equal(bar, 2);
|
27871
|
+
equal(this, route);
|
27872
|
+
return true;
|
27873
|
+
},
|
27874
|
+
|
27875
|
+
returnsFalse: function() {
|
27876
|
+
ok(true, "returnsFalse was called");
|
27877
|
+
return false;
|
27878
|
+
}
|
27879
|
+
}
|
27880
|
+
});
|
27881
|
+
|
27882
|
+
equal(true, route.send('returnsTrue', 1, 2));
|
27883
|
+
equal(false, route.send('returnsFalse'));
|
27884
|
+
equal(undefined, route.send('nonexistent', 1, 2, 3));
|
27885
|
+
});
|
27886
|
+
|
27887
|
+
|
27847
27888
|
QUnit.module("Ember.Route serialize", {
|
27848
27889
|
setup: createRoute,
|
27849
27890
|
teardown: cleanupRoute
|
@@ -48078,6 +48119,27 @@ enifed("ember-views/tests/system/view_utils_test",
|
|
48078
48119
|
var run = __dependency1__["default"];
|
48079
48120
|
var View = __dependency2__["default"];
|
48080
48121
|
|
48122
|
+
var hasGetClientRects, hasGetBoundingClientRect;
|
48123
|
+
var ClientRectListCtor, ClientRectCtor;
|
48124
|
+
|
48125
|
+
(function() {
|
48126
|
+
if (document.createRange) {
|
48127
|
+
var range = document.createRange();
|
48128
|
+
|
48129
|
+
if (range.getClientRects) {
|
48130
|
+
var clientRectsList = range.getClientRects();
|
48131
|
+
hasGetClientRects = true;
|
48132
|
+
ClientRectListCtor = clientRectsList && clientRectsList.constructor;
|
48133
|
+
}
|
48134
|
+
|
48135
|
+
if (range.getBoundingClientRect) {
|
48136
|
+
var clientRect = range.getBoundingClientRect();
|
48137
|
+
hasGetBoundingClientRect = true;
|
48138
|
+
ClientRectCtor = clientRect && clientRect.constructor;
|
48139
|
+
}
|
48140
|
+
}
|
48141
|
+
})();
|
48142
|
+
|
48081
48143
|
var view;
|
48082
48144
|
|
48083
48145
|
QUnit.module("ViewUtils", {
|
@@ -48088,9 +48150,10 @@ enifed("ember-views/tests/system/view_utils_test",
|
|
48088
48150
|
}
|
48089
48151
|
});
|
48090
48152
|
|
48153
|
+
|
48091
48154
|
test("getViewClientRects", function() {
|
48092
|
-
if (!
|
48093
|
-
ok(true, "The test environment does not support the DOM API required
|
48155
|
+
if (!hasGetClientRects || !ClientRectListCtor) {
|
48156
|
+
ok(true, "The test environment does not support the DOM API required to run this test.");
|
48094
48157
|
return;
|
48095
48158
|
}
|
48096
48159
|
|
@@ -48102,12 +48165,12 @@ enifed("ember-views/tests/system/view_utils_test",
|
|
48102
48165
|
|
48103
48166
|
run(function() { view.appendTo('#qunit-fixture'); });
|
48104
48167
|
|
48105
|
-
ok(Ember.ViewUtils.getViewClientRects(view) instanceof
|
48168
|
+
ok(Ember.ViewUtils.getViewClientRects(view) instanceof ClientRectListCtor);
|
48106
48169
|
});
|
48107
48170
|
|
48108
48171
|
test("getViewBoundingClientRect", function() {
|
48109
|
-
if (!
|
48110
|
-
ok(true, "The test environment does not support the DOM API required
|
48172
|
+
if (!hasGetBoundingClientRect || !ClientRectCtor) {
|
48173
|
+
ok(true, "The test environment does not support the DOM API required to run this test.");
|
48111
48174
|
return;
|
48112
48175
|
}
|
48113
48176
|
|
@@ -48119,7 +48182,7 @@ enifed("ember-views/tests/system/view_utils_test",
|
|
48119
48182
|
|
48120
48183
|
run(function() { view.appendTo('#qunit-fixture'); });
|
48121
48184
|
|
48122
|
-
ok(Ember.ViewUtils.getViewBoundingClientRect(view) instanceof
|
48185
|
+
ok(Ember.ViewUtils.getViewBoundingClientRect(view) instanceof ClientRectCtor);
|
48123
48186
|
});
|
48124
48187
|
});
|
48125
48188
|
enifed("ember-views/tests/system/view_utils_test.jshint",
|
@@ -59915,6 +59978,79 @@ enifed("ember/tests/routing/basic_test",
|
|
59915
59978
|
Ember.run(router, 'transitionTo', 'out');
|
59916
59979
|
deepEqual(calls, [['reset', 'c'], ['reset', 'a'], ['setup', 'out']]);
|
59917
59980
|
});
|
59981
|
+
|
59982
|
+
test("Exception during initialization of non-initial route is not swallowed", function() {
|
59983
|
+
Router.map(function() {
|
59984
|
+
this.route('boom');
|
59985
|
+
});
|
59986
|
+
App.BoomRoute = Ember.Route.extend({
|
59987
|
+
init: function() {
|
59988
|
+
throw new Error("boom!");
|
59989
|
+
}
|
59990
|
+
});
|
59991
|
+
bootApplication();
|
59992
|
+
throws(function(){
|
59993
|
+
Ember.run(router, 'transitionTo', 'boom');
|
59994
|
+
}, /\bboom\b/);
|
59995
|
+
});
|
59996
|
+
|
59997
|
+
|
59998
|
+
test("Exception during load of non-initial route is not swallowed", function() {
|
59999
|
+
Router.map(function() {
|
60000
|
+
this.route('boom');
|
60001
|
+
});
|
60002
|
+
var lookup = container.lookup;
|
60003
|
+
container.lookup = function() {
|
60004
|
+
if (arguments[0] === 'route:boom') {
|
60005
|
+
throw new Error("boom!");
|
60006
|
+
}
|
60007
|
+
return lookup.apply(this, arguments);
|
60008
|
+
};
|
60009
|
+
App.BoomRoute = Ember.Route.extend({
|
60010
|
+
init: function() {
|
60011
|
+
throw new Error("boom!");
|
60012
|
+
}
|
60013
|
+
});
|
60014
|
+
bootApplication();
|
60015
|
+
throws(function(){
|
60016
|
+
Ember.run(router, 'transitionTo', 'boom');
|
60017
|
+
});
|
60018
|
+
});
|
60019
|
+
|
60020
|
+
test("Exception during initialization of initial route is not swallowed", function() {
|
60021
|
+
Router.map(function() {
|
60022
|
+
this.route('boom', {path: '/'});
|
60023
|
+
});
|
60024
|
+
App.BoomRoute = Ember.Route.extend({
|
60025
|
+
init: function() {
|
60026
|
+
throw new Error("boom!");
|
60027
|
+
}
|
60028
|
+
});
|
60029
|
+
throws(function(){
|
60030
|
+
bootApplication();
|
60031
|
+
}, /\bboom\b/);
|
60032
|
+
});
|
60033
|
+
|
60034
|
+
test("Exception during load of initial route is not swallowed", function() {
|
60035
|
+
Router.map(function() {
|
60036
|
+
this.route('boom', {path: '/'});
|
60037
|
+
});
|
60038
|
+
var lookup = container.lookup;
|
60039
|
+
container.lookup = function() {
|
60040
|
+
if (arguments[0] === 'route:boom') {
|
60041
|
+
throw new Error("boom!");
|
60042
|
+
}
|
60043
|
+
return lookup.apply(this, arguments);
|
60044
|
+
};
|
60045
|
+
App.BoomRoute = Ember.Route.extend({
|
60046
|
+
init: function() {
|
60047
|
+
throw new Error("boom!");
|
60048
|
+
}
|
60049
|
+
});
|
60050
|
+
throws(function(){
|
60051
|
+
bootApplication();
|
60052
|
+
}, /\bboom\b/);
|
60053
|
+
});
|
59918
60054
|
});
|
59919
60055
|
enifed("ember/tests/routing/basic_test.jshint",
|
59920
60056
|
[],
|