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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html
index 3f8a11adfa827c60578f3c45c656a3283fc9b608..63be7bdfabd20be96f3963bba87c4b6ccedb5cb1 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html
@@ -1,9 +1,35 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/htmloutputelement-validity.js"></script>
+<script>
+description('Tests for the validation APIs of output elements.');
+
+var container;
+var output;
+
+container = document.createElement('div');
+document.body.appendChild(container);
+
+debug('- Ensures whether the willValidate is defined and it always returns false.');
+container.innerHTML = '<form><output id="outputElement">aValue</output></form>';
+output = document.getElementById('outputElement');
+shouldBe('typeof output.willValidate', '"boolean"');
+shouldBeFalse('output.willValidate');
+container.innerHTML = '<output id="outputElement">aValue</output>';
+output = document.getElementById('outputElement');
+shouldBeFalse('output.willValidate');
+
+debug('- Ensures validity is always "valid" and validationMessage() always returns an empty string.');
+container.innerHTML = '<form><output id="outputElement">aValue</output></form>';
+output = document.getElementById('outputElement');
+shouldBeEqualToString('output.validationMessage', '');
+shouldBeTrue('output.checkValidity()');
+output.setCustomValidity('This should not be affected.');
+shouldBeEqualToString('output.validationMessage', '');
+shouldBeTrue('output.checkValidity()');
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698