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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event.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-reset-event.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html
index b74a048af87d0f90c732638272bad338afedc3dc..51d49438dd53b6044f25cd2d6c0c2b9114134878 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html
@@ -1,9 +1,37 @@
-<!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-reset-event.js"></script>
+<script>
+description('A Test for sending a reset event to output elements.');
+
+var form = document.createElement('form');
+var output = document.createElement('output');
+output.defaultValue = 'defaultValue';
+form.appendChild(output);
+
+debug('- Sets the value attribute of the output element.');
+output.value = 'aValue';
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'aValue');
+shouldBeEqualToString('output.innerText', 'aValue');
+shouldBeEqualToString('output.innerHTML', 'aValue');
+
+debug('- Sends a reset event to reset the value to the default value.');
+form.reset();
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'defaultValue');
+shouldBeEqualToString('output.innerText', 'defaultValue');
+shouldBeEqualToString('output.innerHTML', 'defaultValue');
+
+debug('- Ensures that the value mode flags is in mode "default".');
+output.defaultValue = 'another defaultValue';
+shouldBeEqualToString('output.defaultValue', 'another defaultValue');
+shouldBeEqualToString('output.value', 'another defaultValue');
+shouldBeEqualToString('output.innerText', 'another defaultValue');
+shouldBeEqualToString('output.innerHTML', 'another defaultValue');
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698