summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/layout_test_controller.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-13 01:56:22 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-13 01:56:22 +0000
commit8cc47ce3146b70a4bef2665eebeb5875050d3534 (patch)
tree42c9679eee636657405a175395d1367bff59dff9 /webkit/tools/test_shell/layout_test_controller.cc
parent11c2fe82bca2cd871eeb7aff77043754ef75651a (diff)
downloadchromium_src-8cc47ce3146b70a4bef2665eebeb5875050d3534.zip
chromium_src-8cc47ce3146b70a4bef2665eebeb5875050d3534.tar.gz
chromium_src-8cc47ce3146b70a4bef2665eebeb5875050d3534.tar.bz2
Adding the elementDoesAutoCompleteForElementWithId method to the layoutTestController class to fix the security/set-form-autocomplete-attribute.html layout test.
Review URL: http://codereview.chromium.org/17364 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7915 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 3a23546..3fa9a06 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -100,6 +100,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) {
BindMethod("setSelectTrailingWhitespaceEnabled", &LayoutTestController::setSelectTrailingWhitespaceEnabled);
BindMethod("pauseAnimationAtTimeOnElementWithId", &LayoutTestController::pauseAnimationAtTimeOnElementWithId);
BindMethod("pauseTransitionAtTimeOnElementWithId", &LayoutTestController::pauseTransitionAtTimeOnElementWithId);
+ BindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId);
// The following are stubs.
BindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive);
@@ -604,6 +605,18 @@ void LayoutTestController::pauseTransitionAtTimeOnElementWithId(
}
}
+void LayoutTestController::elementDoesAutoCompleteForElementWithId(
+ const CppArgumentList& args,
+ CppVariant* result) {
+ if (args.size() != 1 || !args[0].isString()) {
+ result->Set(false);
+ return;
+ }
+ std::string element_id = args[0].ToString();
+ result->Set(webkit_glue::ElementDoesAutoCompleteForElementWithId(
+ shell_->webView(), element_id));
+}
+
//
// Unimplemented stubs
//