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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/document-metadata/the-style-element/style_disabled.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (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 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>HTML Test: The style should not be applied if it is disabled</title>
6 <link rel="author" title="Intel" href="http://www.intel.com/">
7 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-style-ele ment">
8 <script src="../../../../../../resources/testharness.js"></script>
9 <script src="../../../../../../resources/testharnessreport.js"></script>
10 <style>
11 #test {
12 width: 100px;
13 }
14 </style>
15 <style id="style">
16 #test {
17 width: 50px;
18 }
19 </style>
20 </head>
21 <body>
22 <div id="log"></div>
23 <div id="test"></div>
24 <script>
25 test(function() {
26 var testElement = document.getElementById("test");
27 var style = document.getElementById("style");
28 var width1, width2;
29
30 width1 = window.getComputedStyle(testElement, false)["width"];
31 assert_equals(width1, "50px", "The style should be applied.");
32
33 style.disabled = true;
34 width2 = window.getComputedStyle(testElement, false)["width"];
35 assert_equals(width2, "100px", "The style should not be applied.");
36 }, "The style is not applied when it is disabled");
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698