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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/form-submission-0/getactionurl.html

Issue 1854003004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/imported/web-platform-tests/html/semantics/forms/form-submission-0/getactionurl.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/form-submission-0/getactionurl.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/form-submission-0/getactionurl.html
new file mode 100644
index 0000000000000000000000000000000000000000..f2d13c518eb6c8676584c7133077b4cd5a96094c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/form-submission-0/getactionurl.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="../../../../../../resources/testharness.js"></script>
+<script src="../../../../../../resources/testharnessreport.js"></script>
+<iframe id=testframe src="/common/blank.html"></iframe>
+<script>
+var tests = [
+ {
+ name: "Navigating to URL with a data scheme",
+ action: "data:,hello%20world",
+ output: "hello world"
+ }
+];
+tests.forEach(function(test_obj) {
+ test_obj.test = async_test(test_obj.name);
+});
+
+function run_test() {
+ if (tests.length == 0) {
+ return;
+ }
+ var test_obj = tests.pop();
+ var t = test_obj.test;
+ var testframe = document.getElementById("testframe");
+ var testdocument = testframe.contentWindow.document;
+ testdocument.body.innerHTML =
+ "<form id=testform method=get action=\"" + test_obj.action +"\"></form>";
+ testframe.onload = function() {
+ t.step(function() {
+ var body_text = testframe.contentWindow.document.textContent;
+ assert_equals(body_text, test_obj.output);
+ });
+ t.done();
+ run_test();
+ };
+ testdocument.getElementById("testform").submit();
+};
+document.getElementById("testframe").onload = run_test;
+</script>

Powered by Google App Engine
This is Rietveld 408576698