summaryrefslogtreecommitdiffstats
path: root/webkit/data
diff options
context:
space:
mode:
authorfqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-12 15:49:05 +0000
committerfqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-12 15:49:05 +0000
commit6043312ed0815d5cdeb625638c56a284e8b62755 (patch)
treedf9f2c7b9df36ca0e5fc3dc4a06ecf6fb44b1598 /webkit/data
parent8772ee554b29a74ecc3d882833acf22ed5581adc (diff)
downloadchromium_src-6043312ed0815d5cdeb625638c56a284e8b62755.zip
chromium_src-6043312ed0815d5cdeb625638c56a284e8b62755.tar.gz
chromium_src-6043312ed0815d5cdeb625638c56a284e8b62755.tar.bz2
I took the patch from bill.neubauer@gmail.com (http://codereview.chromium.org/1919 Patch Set 1)
and changed the test to be a real layout test and added expected output. Review URL: http://codereview.chromium.org/2459 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2111 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/data')
-rw-r--r--webkit/data/layout_tests/chrome/fast/forms/var-name-conflict-in-form-event-handler-expected.txt4
-rw-r--r--webkit/data/layout_tests/chrome/fast/forms/var-name-conflict-in-form-event-handler.html28
2 files changed, 32 insertions, 0 deletions
diff --git a/webkit/data/layout_tests/chrome/fast/forms/var-name-conflict-in-form-event-handler-expected.txt b/webkit/data/layout_tests/chrome/fast/forms/var-name-conflict-in-form-event-handler-expected.txt
new file mode 100644
index 0000000..7456b9a
--- /dev/null
+++ b/webkit/data/layout_tests/chrome/fast/forms/var-name-conflict-in-form-event-handler-expected.txt
@@ -0,0 +1,4 @@
+This tests that a locally scoped variable in an event handler of a form takes precedence over items of form.
+
+
+This test: PASSED!
diff --git a/webkit/data/layout_tests/chrome/fast/forms/var-name-conflict-in-form-event-handler.html b/webkit/data/layout_tests/chrome/fast/forms/var-name-conflict-in-form-event-handler.html
new file mode 100644
index 0000000..77d3da6
--- /dev/null
+++ b/webkit/data/layout_tests/chrome/fast/forms/var-name-conflict-in-form-event-handler.html
@@ -0,0 +1,28 @@
+<html>
+<body>
+<p>This tests that a locally scoped variable in an event handler of a form
+takes precedence over items of form.
+
+<form>
+<select onChange="var value = this.value;this.options[0].selected=true; if(value=='C') document.getElementById('sourceViewDiv').innerHTML='This test: PASSED!'">
+<option value="A">A</option>
+<option value="B">B</option>
+<option value="C">C</option>
+</select>
+
+<div id='sourceViewDiv'>This test: FAILED</div>
+
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+var x=document.getElementsByTagName('select')[0];
+x.options[2].selected=true;
+var evt = document.createEvent("HTMLEvents");
+evt.initEvent("change", true, true);
+x.dispatchEvent(evt);
+</script>
+</form>
+
+</body>
+</html>