Mercurial > code > home > repos > light9
annotate web/light9-color-picker_test.html @ 2405:69ca2b2fc133
overcomplicated attempt at persisting the pane layout in the rdf graph
this was hard because we have to somehow wait for the graph to load before config'ing the panes
author | drewp@bigasterisk.com |
---|---|
date | Fri, 17 May 2024 16:58:26 -0700 |
parents | 4556eebe5d73 |
children |
rev | line source |
---|---|
1763
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
1 <!doctype html> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
2 <html> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
3 <head> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
4 <title>light9-color-picker test</title> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
5 <meta charset="utf-8"> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
6 <script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js"></script> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
7 <script src="/node_modules/mocha/mocha.js"></script> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
8 <script src="/node_modules/chai/chai.js"></script> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
9 <link rel="stylesheet" media="all" href="/node_modules/mocha/mocha.css"> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
10 <link rel="import" href="/lib/polymer/lib/elements/dom-bind.html"> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
11 |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
12 <link rel="import" href="light9-color-picker.html"> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
13 </head> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
14 <body> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
15 <div id="mocha"><p><a href=".">Index</a></p></div> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
16 <div id="messages"></div> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
17 <div id="fixtures"> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
18 <dom-bind> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
19 <template> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
20 <light9-color-picker id="pick" color="{{color}}"></light9-color-picker> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
21 </template> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
22 </dom-bind> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
23 </div> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
24 |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
25 <script> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
26 mocha.setup('bdd'); |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
27 const assert = chai.assert; |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
28 |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
29 describe("RainbowCanvas", () => { |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
30 it("loads rainbow", (done) => { |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
31 const rc = new RainbowCanvas('/colorpick_rainbow_large.png', [400, 200]); |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
32 rc.onLoad(() => { |
1921
0c54bd6e1630
color picker no longer opens on hover, and no longer shows a rainbow in small mode.
Drew Perttula <drewp@bigasterisk.com>
parents:
1763
diff
changeset
|
33 assert.equal(rc.colorAt([200, 100]), '#ff38eb'); |
1763
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
34 done(); |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
35 }); |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
36 }); |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
37 }); |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
38 mocha.run(); |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
39 </script> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
40 </body> |
9060602f7b3c
try to fix canvas issue, but it seems like just a bug in chrome 61
drewp@bigasterisk.com
parents:
diff
changeset
|
41 </html> |