Index: test/codegen/expect/_js_primitives/_js_primitives.js |
diff --git a/test/codegen/expect/_js_primitives/_js_primitives.js b/test/codegen/expect/_js_primitives/_js_primitives.js |
index 4112fcd910b6a6ea1baa2624eeea8e0af4ee9be4..af32b2f09ce66623d1c5fa895eb1308c539053fd 100644 |
--- a/test/codegen/expect/_js_primitives/_js_primitives.js |
+++ b/test/codegen/expect/_js_primitives/_js_primitives.js |
@@ -3,22 +3,22 @@ var _js_primitives; |
'use strict'; |
// Function printString: (String) → void |
function printString(string) { |
- if (_foreign_helper.JS('bool', 'typeof dartPrint == "function"')) { |
- _foreign_helper.JS('void', 'dartPrint(#)', string); |
+ if (typeof dartPrint == "function") { |
+ dartPrint(string); |
return; |
} |
- if (dart.dbinary(_foreign_helper.JS('bool', 'typeof console == "object"'), '&&', _foreign_helper.JS('bool', 'typeof console.log != "undefined"'))) { |
- _foreign_helper.JS('void', 'console.log(#)', string); |
+ if (dart.notNull(typeof console == "object") && dart.notNull(typeof console.log != "undefined")) { |
+ console.log(string); |
return; |
} |
- if (_foreign_helper.JS('bool', 'typeof window == "object"')) { |
+ if (typeof window == "object") { |
return; |
} |
- if (_foreign_helper.JS('bool', 'typeof print == "function"')) { |
- _foreign_helper.JS('void', 'print(#)', string); |
+ if (typeof print == "function") { |
+ print(string); |
return; |
} |
- _foreign_helper.JS('void', 'throw "Unable to print message: " + String(#)', string); |
+ throw "Unable to print message: " + String(string); |
} |
// Exports: |
_js_primitives.printString = printString; |