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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html

Issue 1159053005: W3C Test: import web-platform-tests/html/{introduction,obsolete} (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>event and htmlFor IDL attributes of HTMLScriptElement</title>
3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-script-event" >
5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-script-htmlfo r">
6 <script src="../../../../../../resources/testharness.js"></script>
7 <script src="../../../../../../resources/testharnessreport.js"></script>
8 <div id="log"></div>
9 <script>
10 test(function() {
11 var script = document.createElement("script");
12 assert_equals(script.event, "");
13 assert_equals(script.htmlFor, "");
14 })
15 test(function() {
16 var script = document.createElement("script");
17 script.setAttribute("event", "blah");
18 script.setAttribute("for", "blah");
19 assert_equals(script.event, "");
20 assert_equals(script.htmlFor, "");
21 assert_equals(script.getAttribute("event"), "blah");
22 assert_equals(script.getAttribute("for"), "blah");
23 })
24 test(function() {
25 var script = document.createElement("script");
26 script.setAttribute("event", "blah");
27 script.setAttribute("for", "blah");
28 script.event = "foo";
29 script.htmlFor = "foo";
30 assert_equals(script.event, "");
31 assert_equals(script.htmlFor, "");
32 assert_equals(script.getAttribute("event"), "blah");
33 assert_equals(script.getAttribute("for"), "blah");
34 })
35 test(function() {
36 var script = document.createElement("script");
37 script.setAttribute("event", "blah");
38 script.setAttribute("for", "blah");
39 script.event = null;
40 script.htmlFor = null;
41 assert_equals(script.event, "");
42 assert_equals(script.htmlFor, "");
43 assert_equals(script.getAttribute("event"), "blah");
44 assert_equals(script.getAttribute("for"), "blah");
45 })
46 test(function() {
47 var script = document.createElement("script");
48 script.setAttribute("event", "blah");
49 script.setAttribute("for", "blah");
50 script.event = undefined;
51 script.htmlFor = undefined;
52 assert_equals(script.event, "");
53 assert_equals(script.htmlFor, "");
54 assert_equals(script.getAttribute("event"), "blah");
55 assert_equals(script.getAttribute("for"), "blah");
56 })
57 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698