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

Side by Side Diff: third_party/protobuf/js/commonjs/export_asserts.js

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 6 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 /**
2 * @fileoverview Exports symbols needed only by tests.
3 *
4 * This file exports several Closure Library symbols that are only
5 * used by tests. It is used to generate a file
6 * closure_asserts_commonjs.js that is only used at testing time.
7 */
8
9 goog.require('goog.testing.asserts');
10
11 var global = Function('return this')();
12
13 // All of the closure "assert" functions are exported at the global level.
14 //
15 // The Google Closure assert functions start with assert, eg.
16 // assertThrows
17 // assertNotThrows
18 // assertTrue
19 // ...
20 //
21 // The one exception is the "fail" function.
22 function shouldExport(str) {
23 return str.lastIndexOf('assert') === 0 || str == 'fail';
24 }
25
26 for (var key in global) {
27 if ((typeof key == "string") && global.hasOwnProperty(key) &&
28 shouldExport(key)) {
29 exports[key] = global[key];
30 }
31 }
32
33 // The COMPILED variable is set by Closure compiler to "true" when it compiles
34 // JavaScript, so in practice this is equivalent to "exports.COMPILED = true".
35 // This will disable some debugging functionality in debug.js. We could
36 // investigate whether this can/should be enabled in CommonJS builds.
37 exports.COMPILED = COMPILED
OLDNEW
« no previous file with comments | « third_party/protobuf/js/commonjs/export.js ('k') | third_party/protobuf/js/commonjs/export_testdeps.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698