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

Side by Side Diff: bower_components/marked/test/browser/test.js

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « bower_components/marked/test/browser/index.js ('k') | bower_components/marked/test/index.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ;(function() {
2
3 var console = {}
4 , files = __TESTS__;
5
6 console.log = function(text) {
7 var args = Array.prototype.slice.call(arguments, 1)
8 , i = 0;
9
10 text = text.replace(/%\w/g, function() {
11 return args[i++] || '';
12 });
13
14 if (window.console) window.console.log(text);
15 document.body.innerHTML += '<pre>' + escape(text) + '</pre>';
16 };
17
18 if (!Object.keys) {
19 Object.keys = function(obj) {
20 var out = []
21 , key;
22
23 for (key in obj) {
24 if (Object.prototype.hasOwnProperty.call(obj, key)) {
25 out.push(key);
26 }
27 }
28
29 return out;
30 };
31 }
32
33 if (!Array.prototype.forEach) {
34 Array.prototype.forEach = function(callback, context) {
35 for (var i = 0; i < this.length; i++) {
36 callback.call(context || null, this[i], i, obj);
37 }
38 };
39 }
40
41 if (!String.prototype.trim) {
42 String.prototype.trim = function() {
43 return this.replace(/^\s+|\s+$/g, '');
44 };
45 }
46
47 function load() {
48 return files;
49 }
50
51 function escape(html, encode) {
52 return html
53 .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;')
54 .replace(/</g, '&lt;')
55 .replace(/>/g, '&gt;')
56 .replace(/"/g, '&quot;')
57 .replace(/'/g, '&#39;');
58 }
59
60 (__MAIN__)();
61
62 }).call(this);
OLDNEW
« no previous file with comments | « bower_components/marked/test/browser/index.js ('k') | bower_components/marked/test/index.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698