Merge branch 'develop' into feature/variable_management

This commit is contained in:
Rachel Fenichel
2016-08-12 14:32:26 -07:00
40 changed files with 6256 additions and 51 deletions

View File

@@ -59,6 +59,29 @@ function test_domToText() {
text.replace(/\s+/g, ''));
}
function test_domToWorkspace() {
Blockly.Blocks.test_block = {
init: function() {
this.jsonInit({
message0: 'test',
});
}
};
try {
var dom = Blockly.Xml.textToDom(
'<xml xmlns="http://www.w3.org/1999/xhtml">' +
' <block type="test_block" inline="true" x="21" y="23">' +
' </block>' +
'</xml>');
var workspace = new Blockly.Workspace();
Blockly.Xml.domToWorkspace(dom, workspace);
assertEquals('Block count', 1, workspace.getAllBlocks().length);
} finally {
delete Blockly.Blocks.test_block;
}
}
function test_domToPrettyText() {
var dom = Blockly.Xml.textToDom(XML_TEXT);
var text = Blockly.Xml.domToPrettyText(dom);