Chromium Code Reviews| Index: webkit/tools/test_shell/layout_test_controller.cc |
| =================================================================== |
| --- webkit/tools/test_shell/layout_test_controller.cc (revision 57506) |
| +++ webkit/tools/test_shell/layout_test_controller.cc (working copy) |
| @@ -15,7 +15,10 @@ |
| #include "base/path_service.h" |
| #include "base/string_number_conversions.h" |
| #include "base/utf_string_conversions.h" |
| +#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" |
| #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
| +#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" |
| +#include "third_party/WebKit/WebKit/chromium/public/WebElement.h" |
| #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationServiceMock.h" |
| #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" |
| @@ -178,6 +181,8 @@ |
| BindMethod("setMockGeolocationPosition", &LayoutTestController::setMockGeolocationPosition); |
| BindMethod("setMockGeolocationError", &LayoutTestController::setMockGeolocationError); |
| + BindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem); |
| + |
| // The fallback method is called when an unknown method is invoked. |
| BindFallbackMethod(&LayoutTestController::fallbackMethod); |
| @@ -1331,3 +1336,13 @@ |
| WebKit::WebGeolocationServiceMock::setMockGeolocationError( |
| args[0].ToInt32(), WebString::fromUTF8(args[1].ToString())); |
| } |
| + |
| +void LayoutTestController::markerTextForListItem(const CppArgumentList& args, |
| + CppVariant* result) { |
| + WebKit::WebElement element; |
|
darin (slow to review)
2010/08/27 03:35:22
nit: I recommend putting 'using WebKit::WebElement
dumi
2010/08/27 03:47:06
done, for all WebKit::X references in this file.
|
| + if (!WebKit::WebBindings::getElement(args[0].value.objectValue, &element)) |
| + result->SetNull(); |
| + else |
| + result->Set( |
| + element.document().frame()->markerTextForListItem(element).utf8()); |
| +} |