Commit 26809838 authored by tzik's avatar tzik Committed by Commit Bot

Move some form tests from fast/ to http/

The web tests below are served as `file:` scheme resources, and uses
`setAllowUniversalAccessFromFileURLs(true)` to bypass all origin check.
So that they can access the URL of iframes.
 - forms/formtarget-attribute-button-html.html
 - forms/formtarget-attribute-input-2.html
 - forms/formtarget-attribute-input-html.html

This CL moves them from web_tests/fast to web_tests/http/tests, so that
they are served via http, and they can access iframes without disabling
the origin check.

Change-Id: I408ac5714d1e81adc248307a3534fb014f2811c9
Reviewed-on: https://chromium-review.googlesource.com/c/1454200Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629483}
parent a6616c8a
......@@ -144,3 +144,9 @@ to fast/dom/HTML*Element/ for HTML forms.
* week-multiple-fields/
Inline UI of `<input type=week>` on desktop platforms.
## Other related directories
* ../../http/tests/forms/
Test cases that needs to be served through http
......@@ -10,7 +10,7 @@ Some areas have their own directories not under html/.
* Canvas: ../fast/canvas/ or ../canvas/
* Editing: ../editing/
* Forms: [../fast/forms/](../fast/forms/README.md)
* Forms: [../fast/forms/](../fast/forms/README.md) or ../http/tests/forms
* History API: ../fast/history/
* Media elements: ../media/
* Navigation/loading: ../fast/loader/, ../loader/, or ../http/tests/loading/
......
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="/js-test-resources/js-test.js"></script>
</head>
<body onload="runTest()">
<form action="resources/success.txt" method="GET" target="failFrame">
......@@ -12,10 +12,8 @@ description("Test for the formtarget attribute in a button tag.");
function runTest()
{
if (window.testRunner) {
testRunner.setAllowUniversalAccessFromFileURLs(true);
if (window.testRunner)
testRunner.waitUntilDone();
}
// Not dumping as text since the DumpRenderTree does not dump the text content of child frames.
var button = document.getElementById('button');
......
<!DOCTYPE html>
<html>
<body onload="runTest()">
<script src="../../resources/js-test.js"></script>
<script src="resources/common.js"></script>
<script src="/js-test-resources/js-test.js"></script>
<form action="resources/success.txt" method="GET" target="failFrame">
<input type="submit" id="button" formtarget="passFrame">
</form>
......@@ -10,11 +9,9 @@
description("Test for the formtarget attribute in an input tag.");
function runTest() {
if (window.testRunner) {
testRunner.setAllowUniversalAccessFromFileURLs(true);
if (window.testRunner)
testRunner.waitUntilDone();
}
clickElement(document.getElementById('button'));
document.getElementById('button').click();
}
function passFrameLoaded() {
......
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="/js-test-resources/js-test.js"></script>
</head>
<body onload="runTest()">
<form action="resources/success.txt" method="GET" target="failFrame">
......@@ -12,10 +12,8 @@ description("Test for the formtarget attribute in an input tag.");
function runTest()
{
if (window.testRunner) {
testRunner.setAllowUniversalAccessFromFileURLs(true);
if (window.testRunner)
testRunner.waitUntilDone();
}
// Not dumping as text since the DumpRenderTree does not dump the text content of child frames.
var button = document.getElementById('button');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment