mirror of
https://github.com/google/blockly.git
synced 2026-01-11 19:07:08 +01:00
Small fixes
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user