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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/uievents/ClickFakeEvent.nondocument.html

Issue 1985363002: Move the uievents directory from web-platform-tests/ to wpt/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 7 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Click event on an element not in the document</title> 2 <title>Click event on an element not in the document</title>
3 <script src="../../../resources/testharness.js"></script> 3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script> 4 <script src="../../../resources/testharnessreport.js"></script>
5 <div id=log></div> 5 <div id=log></div>
6 <script> 6 <script>
7 test(function() { 7 test(function() {
8 var EVENT = "click"; 8 var EVENT = "click";
9 var TARGET = document.createElement("somerandomelement"); 9 var TARGET = document.createElement("somerandomelement");
10 var t = async_test("Click event can be dispatched to an element that is not in the document.") 10 var t = async_test("Click event can be dispatched to an element that is not in the document.")
11 TARGET.addEventListener(EVENT, t.step_func(function(evt) { 11 TARGET.addEventListener(EVENT, t.step_func(function(evt) {
12 assert_equals(evt.target, TARGET); 12 assert_equals(evt.target, TARGET);
13 t.done(); 13 t.done();
14 }), true); 14 }), true);
15 var e = document.createEvent("Event"); 15 var e = document.createEvent("Event");
16 e.initEvent(EVENT, true, true); 16 e.initEvent(EVENT, true, true);
17 TARGET.dispatchEvent(e); 17 TARGET.dispatchEvent(e);
18 }); 18 });
19 </script> 19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698