Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: test/wrappers/pages.js

Issue 29903561: Noissue - Make test pages automation more reliable against timing issues (Closed)
Patch Set: Created Oct. 6, 2018, 11:43 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (title.startsWith("$popup Exception -")) 181 if (title.startsWith("$popup Exception -"))
182 { 182 {
183 assert.equal(handles.length, 3, title); 183 assert.equal(handles.length, 3, title);
184 return closeWindow(this.driver, handles[2], handles[1]); 184 return closeWindow(this.driver, handles[2], handles[1]);
185 } 185 }
186 186
187 assert.equal(handles.length, 2, title); 187 assert.equal(handles.length, 2, title);
188 }); 188 });
189 } 189 }
190 190
191 return takeScreenshot(element).then(screenshot => 191 return this.driver.wait(() =>
192 assert.ok( 192 takeScreenshot(element).then(screenshot =>
193 screenshot.width == expectedScreenshot.width && 193 screenshot.width == expectedScreenshot.width &&
194 screenshot.height == expectedScreenshot.height && 194 screenshot.height == expectedScreenshot.height &&
195 screenshot.data.compare(expectedScreenshot.data) == 0, 195 screenshot.data.compare(expectedScreenshot.data) == 0,
196 title 196 ), 1000, title
197 )
198 ); 197 );
199 }); 198 });
200 } 199 }
201 return p2; 200 return p2;
202 }); 201 });
203 return p1; 202 return p1;
204 }); 203 });
205 }); 204 });
206 205
207 it("subscribe link", function() 206 it("subscribe link", function()
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 `) 246 `)
248 ).then(([added, err]) => 247 ).then(([added, err]) =>
249 { 248 {
250 if (err) 249 if (err)
251 throw err; 250 throw err;
252 assert.ok(added, "subscription added"); 251 assert.ok(added, "subscription added");
253 }) 252 })
254 ) 253 )
255 ); 254 );
256 }); 255 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld