Do not announce robot account token before account ID is available
[chromium-blink-merge.git] / chrome / test / data / webui / command_test.html
blob2000dd099b3c2b905dfac153fdb26e427239a7c3
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>cr.ui.Command test</title>
5 </head>
6 <body>
7 <command></command>
8 <script>
10 function testCommandDefaultPrevented() {
11 var calls = 0;
12 document.addEventListener('canExecute', function(e) {
13 ++calls;
14 assertFalse(e.defaultPrevented);
15 e.canExecute = true;
16 assertTrue(e.defaultPrevented);
17 });
19 cr.ui.decorate('command', cr.ui.Command);
20 document.querySelector('command').canExecuteChange();
21 assertEquals(1, calls);
24 </script>
25 </body>
26 </html>