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

Side by Side Diff: pkg/polymer/lib/elements/polymer-file/test/html/polymer-file.html

Issue 175443005: [polymer] import all elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated from bower Created 6 years, 9 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
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>polymer-file</title>
5 <script src="../../../platform/platform.js"></script>
6 <script src="../../../tools/test/htmltest.js"></script>
7 <script src="../../../tools/test/chai/chai.js"></script>
8 <link rel="import" href="../../polymer-file.html">
9 </head>
10 <body>
11
12 <polymer-file auto readas="text"></polymer-file>
13
14 <script>
15 var assert = chai.assert;
16 document.addEventListener('polymer-ready', function() {
17 var DATA = 'abc123';
18
19 var pfile = document.querySelector('polymer-file');
20
21 assert.isNull(pfile.blob);
22 assert.isTrue(pfile.auto);
23 assert.equal(pfile.readas, 'text');
24 assert.isNull(pfile.result, ".auto doesn't start a read");
25
26 pfile.blob = new Blob([DATA], {type: 'text/plain'});
27
28 pfile.addEventListener('polymer-result', function(e) {
29 assert.isDefined(e.detail.result);
30 assert.isString(e.detail.result, 'Result is a text string');
31 assert.equal(e.detail.result, DATA, 'Result correct data');
32 assert.equal(pfile.result, DATA, '.result was set correctly');
33
34 done();
35 });
36 //pfile.read();
37 });
38 </script>
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « pkg/polymer/lib/elements/polymer-file/polymer-file.html ('k') | pkg/polymer/lib/elements/polymer-file/test/js/polymer-file.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698