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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/forms/the-option-element/option-text-label.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 <meta charset=utf-8>
3 <title>HTMLOptionElement.text</title>
4 <link rel=author title=Ms2ger href="mailto:Ms2ger@gmail.com">
5 <link rel=help href="https://html.spec.whatwg.org/multipage/#dom-option-text">
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 option = document.createElement("option");
12 option.setAttribute("label", "label");
13 option.textContent = "text";
14 assert_equals(option.text, "text");
15 }, "Option with non-empty label.");
16
17 test(function() {
18 var option = document.createElement("option");
19 option.setAttribute("label", "");
20 option.textContent = "text";
21 assert_equals(option.text, "text");
22 }, "Option with empty label.");
23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698