Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
renderjs
Commits
03fbd623
Commit
03fbd623
authored
Jan 21, 2014
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that iframe gadget loading error is correctly propagated.
parent
05471f46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
test/embedded_fail.html
test/embedded_fail.html
+14
-0
test/embedded_fail.js
test/embedded_fail.js
+12
-0
test/renderjs_test.js
test/renderjs_test.js
+21
-0
No files found.
test/embedded_fail.html
0 → 100644
View file @
03fbd623
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Embedded page for renderJS test
</title>
<meta
name=
"viewport"
content=
"width=device-width, height=device-height"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<script
src=
"../node_modules/rsvp/dist/rsvp-2.0.4.js"
type=
"text/javascript"
></script>
<script
src=
"../dist/renderjs-latest.js"
type=
"text/javascript"
></script>
<script
src=
"./embedded_fail.js"
type=
"text/javascript"
></script>
</head>
<body>
</body>
</html>
test/embedded_fail.js
0 → 100644
View file @
03fbd623
(
function
(
window
,
rJS
)
{
"
use strict
"
;
var
gk
=
rJS
(
window
);
gk
.
ready
(
function
(
g
)
{
return
RSVP
.
delay
(
50
).
then
(
function
()
{
throw
new
Error
(
"
Manually rejected
"
);
});
});
}(
window
,
rJS
));
test/renderjs_test.js
View file @
03fbd623
...
...
@@ -1944,6 +1944,27 @@
});
});
test
(
'
checking failing iframe gadget
'
,
function
()
{
// Check that declare gadget returns the gadget
var
gadget
=
new
RenderJSGadget
(),
url
=
"
./embedded_fail.html
"
;
stop
();
gadget
.
declareGadget
(
url
,
{
sandbox
:
'
iframe
'
,
element
:
document
.
getElementById
(
'
qunit-fixture
'
)
})
.
then
(
function
(
new_gadget
)
{
ok
(
false
);
})
.
fail
(
function
(
error
)
{
equal
(
error
,
"
Error: Manually rejected
"
);
})
.
always
(
function
()
{
start
();
});
});
/////////////////////////////////////////////////////////////////
// RenderJSGadget bootstrap
/////////////////////////////////////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment