Commit eae4943a authored by Alain Takoudjou's avatar Alain Takoudjou

replicated opml storage: improvements, update scenario test

parent a5515a0a
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<link rel="stylesheet" href="../node_modules/grunt-contrib-qunit/test/libs/qunit.css" type="text/css" media="screen"/> <link rel="stylesheet" href="../node_modules/grunt-contrib-qunit/test/libs/qunit.css" type="text/css" media="screen"/>
<script src="../node_modules/grunt-contrib-qunit/test/libs/qunit.js" type="text/javascript"></script> <script src="../node_modules/grunt-contrib-qunit/test/libs/qunit.js" type="text/javascript"></script>
<script src="../node_modules/sinon/pkg/sinon.js" type="text/javascript"></script>
<script src="scenario_monitor.js"></script> <script src="scenario_monitor.js"></script>
</head> </head>
......
This diff is collapsed.
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
function getOpmlOutlineAsDict(outline) { function getOpmlOutlineAsDict(outline) {
var outline_dict = { var outline_dict = {
title: outline.getAttribute('title') || '', title: outline.getAttribute('title') || dummy.textContent,
htmlurl: outline.getAttribute('htmlUrl') || '', htmlurl: outline.getAttribute('htmlUrl') || dummy.textContent,
xmlurl: outline.getAttribute('xmlUrl') || '', xmlurl: outline.getAttribute('xmlUrl') || dummy.textContent,
url: outline.getAttribute('url') || '', url: outline.getAttribute('url') || dummy.textContent,
text: outline.getAttribute('text') || '', text: outline.getAttribute('text') || dummy.textContent,
type: outline.getAttribute('type') || '', type: outline.getAttribute('type') || dummy.textContent,
version: outline.getAttribute('version') || '', version: outline.getAttribute('version') || dummy.textContent,
created: outline.getAttribute('created') || '', created: outline.getAttribute('created') || dummy.textContent,
category: outline.getAttribute('category') || '' category: outline.getAttribute('category') || dummy.textContent
}; };
return outline_dict; return outline_dict;
} }
...@@ -122,6 +122,9 @@ ...@@ -122,6 +122,9 @@
.push(function (response) { .push(function (response) {
var element, var element,
result; result;
if (!response.target.responseText) {
throw new jIO.util.jIOError("Cannot find document", 404);
}
element = new DOMParser().parseFromString( element = new DOMParser().parseFromString(
response.target.responseText, response.target.responseText,
"text/xml" "text/xml"
......
...@@ -152,6 +152,9 @@ ...@@ -152,6 +152,9 @@
.push(function (response) { .push(function (response) {
var element, var element,
item; item;
if (!response.target.responseText) {
throw new jIO.util.jIOError("Cannot find document", 404);
}
element = new DOMParser().parseFromString( element = new DOMParser().parseFromString(
response.target.responseText, response.target.responseText,
"text/xml" "text/xml"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment