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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/dom/events/Event-subclasses-constructors.html

Issue 2012333004: Fix testharness paths in imported/wpt/{dom,html}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 <title>Event constructors</title> 3 <title>Event constructors</title>
4 <script src="../../../../resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="../../../../resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 <div id="log"></div> 6 <div id="log"></div>
7 <script> 7 <script>
8 function assert_props(iface, event, defaults) { 8 function assert_props(iface, event, defaults) {
9 assert_true(event instanceof self[iface]); 9 assert_true(event instanceof self[iface]);
10 expected[iface].properties.forEach(function(p) { 10 expected[iface].properties.forEach(function(p) {
11 var property = p[0], value = p[defaults ? 1 : 2]; 11 var property = p[0], value = p[defaults ? 1 : 2];
12 assert_true(property in event, 12 assert_true(property in event,
13 "Event " + format_value(event) + " should have a " + 13 "Event " + format_value(event) + " should have a " +
14 property + " property"); 14 property + " property");
15 assert_equals(event[property], value, 15 assert_equals(event[property], value,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 assert_props(iface, event, false); 144 assert_props(iface, event, false);
145 }, iface + " constructor (argument with non-default values)"); 145 }, iface + " constructor (argument with non-default values)");
146 }); 146 });
147 147
148 test(function () { 148 test(function () {
149 assert_throws(new TypeError(), function() { 149 assert_throws(new TypeError(), function() {
150 new UIEvent("x", { view: 7 }) 150 new UIEvent("x", { view: 7 })
151 }); 151 });
152 }, "UIEvent constructor (view argument with wrong type)") 152 }, "UIEvent constructor (view argument with wrong type)")
153 </script> 153 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698