1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/debugger/test/code_math.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +function add(a, b, k) { 1.5 + var result = a + b; 1.6 + return k(result); 1.7 +} 1.8 + 1.9 +function sub(a, b, k) { 1.10 + var result = a - b; 1.11 + return k(result); 1.12 +} 1.13 + 1.14 +function mul(a, b, k) { 1.15 + var result = a * b; 1.16 + return k(result); 1.17 +} 1.18 + 1.19 +function div(a, b, k) { 1.20 + var result = a / b; 1.21 + return k(result); 1.22 +} 1.23 + 1.24 +function arithmetic() { 1.25 + add(4, 4, function (a) { 1.26 + // 8 1.27 + sub(a, 2, function (b) { 1.28 + // 6 1.29 + mul(b, 3, function (c) { 1.30 + // 18 1.31 + div(c, 2, function (d) { 1.32 + // 9 1.33 + console.log(d); 1.34 + }); 1.35 + }); 1.36 + }); 1.37 + }); 1.38 +} 1.39 + 1.40 +// Compile with closure compiler and the following flags: 1.41 +// 1.42 +// --compilation_level WHITESPACE_ONLY 1.43 +// --source_map_format V3 1.44 +// --create_source_map code_math.map 1.45 +// --js_output_file code_math.min.js 1.46 +// 1.47 +// And then append the sourceMappingURL comment directive to code_math.min.js 1.48 +// manually.