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

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

Issue 358173003: Remove rebaseline logic from GOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/ui/actions.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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 "R=abarth@chromium.org, abarth\n" + 88 "R=abarth@chromium.org, abarth\n" +
89 "BUG=11\n" + 89 "BUG=11\n" +
90 "\n" + 90 "\n" +
91 "Review URL: https://codereview.chromium.org/25275005\n" + 91 "Review URL: https://codereview.chromium.org/25275005\n" +
92 "\n" + 92 "\n" +
93 "git-svn-id: svn://svn.chromium.org/blink/trunk@1 bbb929c8-8fbe-4397-9dbb-9b2 b20218538\n" + 93 "git-svn-id: svn://svn.chromium.org/blink/trunk@1 bbb929c8-8fbe-4397-9dbb-9b2 b20218538\n" +
94 "</content>\n" + 94 "</content>\n" +
95 "</entry>\n" + 95 "</entry>\n" +
96 "</feed>\n"; 96 "</feed>\n";
97 97
98 test("rebaselineQueue", 3, function() {
99 var queue = model.takeRebaselineQueue();
100 deepEqual(queue, []);
101 model.queueForRebaseline('failureInfo1');
102 model.queueForRebaseline('failureInfo2');
103 var queue = model.takeRebaselineQueue();
104 deepEqual(queue, ['failureInfo1', 'failureInfo2']);
105 var queue = model.takeRebaselineQueue();
106 deepEqual(queue, []);
107 });
108
109 test("rebaselineQueue", 3, function() {
110 var queue = model.takeExpectationUpdateQueue();
111 deepEqual(queue, []);
112 model.queueForExpectationUpdate('failureInfo1');
113 model.queueForExpectationUpdate('failureInfo2');
114 var queue = model.takeExpectationUpdateQueue();
115 deepEqual(queue, ['failureInfo1', 'failureInfo2']);
116 var queue = model.takeExpectationUpdateQueue();
117 deepEqual(queue, []);
118 });
119
120 asyncTest("updateRecentCommits", 2, function() { 98 asyncTest("updateRecentCommits", 2, function() {
121 var simulator = new NetworkSimulator(); 99 var simulator = new NetworkSimulator();
122 100
123 simulator.xml = function(url) 101 simulator.xml = function(url)
124 { 102 {
125 var parser = new DOMParser(); 103 var parser = new DOMParser();
126 var responseDOM = parser.parseFromString(kExampleCommitDataXML, "applica tion/xml"); 104 var responseDOM = parser.parseFromString(kExampleCommitDataXML, "applica tion/xml");
127 return Promise.resolve(responseDOM); 105 return Promise.resolve(responseDOM);
128 }; 106 };
129 107
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 'Mr. Beasley': { }, 211 'Mr. Beasley': { },
234 'Mr Dixon': {blink_revision: '2'}, 212 'Mr Dixon': {blink_revision: '2'},
235 'Mr. Sabatini': {blink_revision: '4'}, 213 'Mr. Sabatini': {blink_revision: '4'},
236 'Bob': {blink_revision: '6'} 214 'Bob': {blink_revision: '6'}
237 }; 215 };
238 equals(model.latestRevisionWithNoBuildersInFlight(), 2); 216 equals(model.latestRevisionWithNoBuildersInFlight(), 2);
239 model.state.resultsByBuilder = unmock; 217 model.state.resultsByBuilder = unmock;
240 }); 218 });
241 219
242 })(); 220 })();
OLDNEW
« no previous file with comments | « Tools/GardeningServer/scripts/model.js ('k') | Tools/GardeningServer/scripts/ui/actions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698