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

Side by Side Diff: LayoutTests/fast/forms/button/button-disabled-blur.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <style> 3 <style>
4 button:disabled { 4 button:disabled {
5 color: #aaa; 5 color: #aaa;
6 } 6 }
7 button { 7 button {
8 -webkit-appearance: none; 8 -webkit-appearance: none;
9 } 9 }
10 </style> 10 </style>
11 <button autofocus onclick="this.disabled = true;">Button</button> 11 <button autofocus onclick="this.disabled = true;">Button</button>
12 <script src="../../js/resources/js-test-pre.js"></script> 12 <script src="../../../resources/js-test.js"></script>
13 <script> 13 <script>
14 jsTestIsAsync = true; 14 jsTestIsAsync = true;
15 var button = document.querySelector('button'); 15 var button = document.querySelector('button');
16 shouldBe('document.activeElement', 'button'); 16 shouldBe('document.activeElement', 'button');
17 debug('Clicking a button makes the button disabled.'); 17 debug('Clicking a button makes the button disabled.');
18 window.onload = function() { 18 window.onload = function() {
19 button.addEventListener('blur', function() { 19 button.addEventListener('blur', function() {
20 testPassed('blur event was disaptched.'); 20 testPassed('blur event was disaptched.');
21 button.remove(); 21 button.remove();
22 finishJSTest(); 22 finishJSTest();
23 }, false); 23 }, false);
24 // Need to wait until CheckFocusedElementTask is unqueued. 24 // Need to wait until CheckFocusedElementTask is unqueued.
25 setTimeout(function() { 25 setTimeout(function() {
26 button.click(); 26 button.click();
27 }, 20); 27 }, 20);
28 setTimeout(function() { 28 setTimeout(function() {
29 testFailed('No blur event.'); 29 testFailed('No blur event.');
30 finishJSTest(); 30 finishJSTest();
31 }, 2000); 31 }, 2000);
32 }; 32 };
33 </script> 33 </script>
34 </body> 34 </body>
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/autofocus-keygen.html ('k') | LayoutTests/fast/forms/calendar-picker/calendar-picker-appearance.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698