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

Side by Side Diff: lib/src/iron-form/test/basic.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month 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 | « lib/src/iron-form/iron-form.html ('k') | lib/src/iron-icon/iron-icon.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <!-- 2 <!--
3 @license 3 @license
4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt 5 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt 7 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
8 Code distributed by Google as part of the polymer project is also 8 Code distributed by Google as part of the polymer project is also
9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt 9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
10 --> 10 -->
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 form = fixture('FormGet'); 303 form = fixture('FormGet');
304 304
305 var submitted = false; 305 var submitted = false;
306 form.addEventListener('iron-form-submit', function() { 306 form.addEventListener('iron-form-submit', function() {
307 submitted = true; 307 submitted = true;
308 }); 308 });
309 309
310 form.addEventListener('iron-form-response', function(event) { 310 form.addEventListener('iron-form-response', function(event) {
311 expect(submitted).to.be.equal(true); 311 expect(submitted).to.be.equal(true);
312 312
313 var response = event.detail; 313 var response = event.detail.response;
314 expect(response).to.be.ok; 314 expect(response).to.be.ok;
315 expect(response).to.be.an('object'); 315 expect(response).to.be.an('object');
316 expect(response.success).to.be.equal(true); 316 expect(response.success).to.be.equal(true);
317 done(); 317 done();
318 }); 318 });
319 319
320 form.submit(); 320 form.submit();
321 server.respond(); 321 server.respond();
322 }); 322 });
323 323
324 test('can submit with method=post', function(done) { 324 test('can submit with method=post', function(done) {
325 form = fixture('FormPost'); 325 form = fixture('FormPost');
326 326
327 var submitted = false; 327 var submitted = false;
328 form.addEventListener('iron-form-submit', function() { 328 form.addEventListener('iron-form-submit', function() {
329 submitted = true; 329 submitted = true;
330 }); 330 });
331 331
332 form.addEventListener('iron-form-response', function(event) { 332 form.addEventListener('iron-form-response', function(event) {
333 expect(submitted).to.be.equal(true); 333 expect(submitted).to.be.equal(true);
334 var response = event.detail; 334 var response = event.detail.response;
335 expect(response).to.be.ok; 335 expect(response).to.be.ok;
336 expect(response).to.be.an('object'); 336 expect(response).to.be.an('object');
337 expect(response.success).to.be.equal(true); 337 expect(response.success).to.be.equal(true);
338 done(); 338 done();
339 }); 339 });
340 340
341 form.submit(); 341 form.submit();
342 server.respond(); 342 server.respond();
343 }); 343 });
344 344
(...skipping 13 matching lines...) Expand all
358 form.submit(); 358 form.submit();
359 server.respond(); 359 server.respond();
360 }); 360 });
361 361
362 }); 362 });
363 363
364 </script> 364 </script>
365 365
366 </body> 366 </body>
367 </html> 367 </html>
OLDNEW
« no previous file with comments | « lib/src/iron-form/iron-form.html ('k') | lib/src/iron-icon/iron-icon.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698