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

Side by Side Diff: Tools/GardeningServer/scripts/model_unittests.js

Issue 359283003: Remove usages of jquery and add sugar.js from garden-o-matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge to ToT Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Tools/GardeningServer/scripts/model.js ('k') | Tools/GardeningServer/scripts/pixelzoomer.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 { 102 {
103 var parser = new DOMParser(); 103 var parser = new DOMParser();
104 var responseDOM = parser.parseFromString(kExampleCommitDataXML, "applica tion/xml"); 104 var responseDOM = parser.parseFromString(kExampleCommitDataXML, "applica tion/xml");
105 return Promise.resolve(responseDOM); 105 return Promise.resolve(responseDOM);
106 }; 106 };
107 107
108 simulator.runTest(function() { 108 simulator.runTest(function() {
109 model.updateRecentCommits().then(function() { 109 model.updateRecentCommits().then(function() {
110 var recentCommits = model.state.recentCommits; 110 var recentCommits = model.state.recentCommits;
111 delete model.state.recentCommits; 111 delete model.state.recentCommits;
112 $.each(recentCommits, function(index, commitData) { 112 recentCommits.forEach(function(commitData) {
113 delete commitData.message; 113 delete commitData.message;
114 }); 114 });
115 deepEqual(recentCommits, [{ 115 deepEqual(recentCommits, [{
116 "revision": 3, 116 "revision": 3,
117 "title": "Throw SecurityError when setting 'Replaceable' propert ies cross-origin.", 117 "title": "Throw SecurityError when setting 'Replaceable' propert ies cross-origin.",
118 "time": "2013-09-30T20:22:01Z", 118 "time": "2013-09-30T20:22:01Z",
119 "summary": "This matches Gecko's behavior for these types of pro perties.", 119 "summary": "This matches Gecko's behavior for these types of pro perties.",
120 "author": "mkwst@chromium.org", 120 "author": "mkwst@chromium.org",
121 "reviewer": "jochen@chromium.org", 121 "reviewer": "jochen@chromium.org",
122 "bugID": [13], 122 "bugID": [13],
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 'Mr. Beasley': { }, 211 'Mr. Beasley': { },
212 'Mr Dixon': {blink_revision: '2'}, 212 'Mr Dixon': {blink_revision: '2'},
213 'Mr. Sabatini': {blink_revision: '4'}, 213 'Mr. Sabatini': {blink_revision: '4'},
214 'Bob': {blink_revision: '6'} 214 'Bob': {blink_revision: '6'}
215 }; 215 };
216 equals(model.latestRevisionWithNoBuildersInFlight(), 2); 216 equals(model.latestRevisionWithNoBuildersInFlight(), 2);
217 model.state.resultsByBuilder = unmock; 217 model.state.resultsByBuilder = unmock;
218 }); 218 });
219 219
220 })(); 220 })();
OLDNEW
« no previous file with comments | « Tools/GardeningServer/scripts/model.js ('k') | Tools/GardeningServer/scripts/pixelzoomer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698