Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: node_modules/vulcanize/node_modules/uglify-js/test/compress/issue-269.js

Issue 800513006: Added vulcanize under third_party/npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: node_modules/vulcanize/node_modules/uglify-js/test/compress/issue-269.js
diff --git a/node_modules/vulcanize/node_modules/uglify-js/test/compress/issue-269.js b/node_modules/vulcanize/node_modules/uglify-js/test/compress/issue-269.js
new file mode 100644
index 0000000000000000000000000000000000000000..1d41dea61b7edb71236dd790ee3769ca6e052c9d
--- /dev/null
+++ b/node_modules/vulcanize/node_modules/uglify-js/test/compress/issue-269.js
@@ -0,0 +1,66 @@
+issue_269_1: {
+ options = {unsafe: true};
+ input: {
+ f(
+ String(x),
+ Number(x),
+ Boolean(x),
+
+ String(),
+ Number(),
+ Boolean()
+ );
+ }
+ expect: {
+ f(
+ x + '', +x, !!x,
+ '', 0, false
+ );
+ }
+}
+
+issue_269_dangers: {
+ options = {unsafe: true};
+ input: {
+ f(
+ String(x, x),
+ Number(x, x),
+ Boolean(x, x)
+ );
+ }
+ expect: {
+ f(String(x, x), Number(x, x), Boolean(x, x));
+ }
+}
+
+issue_269_in_scope: {
+ options = {unsafe: true};
+ input: {
+ var String, Number, Boolean;
+ f(
+ String(x),
+ Number(x, x),
+ Boolean(x)
+ );
+ }
+ expect: {
+ var String, Number, Boolean;
+ f(String(x), Number(x, x), Boolean(x));
+ }
+}
+
+strings_concat: {
+ options = {unsafe: true};
+ input: {
+ f(
+ String(x + 'str'),
+ String('str' + x)
+ );
+ }
+ expect: {
+ f(
+ x + 'str',
+ 'str' + x
+ );
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698