Small fixes

This commit is contained in:
alschmiedt
2018-12-19 09:53:54 -08:00
parent 3b92380872
commit 8544491228
3 changed files with 5 additions and 5 deletions

View File

@@ -292,7 +292,7 @@ function test_set_style_throw_exception() {
var blockA = workspace.newBlock('row_block');
try {
blockA.setStyle('styleOne');
}catch(error){
}catch(error) {
assertEquals(error, "Invalid style name: styleOne");
}finally {
blockTest_tearDown();

View File

@@ -122,9 +122,9 @@ function test_setStyleForBlockly() {
var blockA = workspace.newBlock('stack_block');
var blocks = [blockA];
blockA.setStyle = function(){this.styleName_ = 'styleTwo'};
blockA.setStyle = function() {this.styleName_ = 'styleTwo'};
var callCount = 1;
workspace.refreshToolboxSelection = function(){
workspace.refreshToolboxSelection = function() {
return ++callCount;
};
blockA.styleName_ = 'styleOne';

View File

@@ -145,9 +145,9 @@ function start() {
function changeStyle() {
var style = document.getElementById('styleChanger');
if (style.value === "modern"){
if (style.value === "modern") {
Blockly.setStyle(Blockly.Styles.Modern);
} else if (style.value === "high_contrast"){
} else if (style.value === "high_contrast") {
Blockly.setStyle(Blockly.Styles.HighContrast);
} else {
Blockly.setStyle(Blockly.Styles.Classic);