OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) | 3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) |
4 * Copyright (C) 2012 Apple Inc. All Rights Reserved. | 4 * Copyright (C) 2012 Apple Inc. All Rights Reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
8 * met: | 8 * met: |
9 * | 9 * |
10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 bindMethod("callShouldCloseOnWebView", &TestRunner::callShouldCloseOnWebView
); | 185 bindMethod("callShouldCloseOnWebView", &TestRunner::callShouldCloseOnWebView
); |
186 bindMethod("setDomainRelaxationForbiddenForURLScheme", &TestRunner::setDomai
nRelaxationForbiddenForURLScheme); | 186 bindMethod("setDomainRelaxationForbiddenForURLScheme", &TestRunner::setDomai
nRelaxationForbiddenForURLScheme); |
187 bindMethod("evaluateScriptInIsolatedWorldAndReturnValue", &TestRunner::evalu
ateScriptInIsolatedWorldAndReturnValue); | 187 bindMethod("evaluateScriptInIsolatedWorldAndReturnValue", &TestRunner::evalu
ateScriptInIsolatedWorldAndReturnValue); |
188 bindMethod("evaluateScriptInIsolatedWorld", &TestRunner::evaluateScriptInIso
latedWorld); | 188 bindMethod("evaluateScriptInIsolatedWorld", &TestRunner::evaluateScriptInIso
latedWorld); |
189 bindMethod("setIsolatedWorldSecurityOrigin", &TestRunner::setIsolatedWorldSe
curityOrigin); | 189 bindMethod("setIsolatedWorldSecurityOrigin", &TestRunner::setIsolatedWorldSe
curityOrigin); |
190 bindMethod("setIsolatedWorldContentSecurityPolicy", &TestRunner::setIsolated
WorldContentSecurityPolicy); | 190 bindMethod("setIsolatedWorldContentSecurityPolicy", &TestRunner::setIsolated
WorldContentSecurityPolicy); |
191 bindMethod("addOriginAccessWhitelistEntry", &TestRunner::addOriginAccessWhit
elistEntry); | 191 bindMethod("addOriginAccessWhitelistEntry", &TestRunner::addOriginAccessWhit
elistEntry); |
192 bindMethod("removeOriginAccessWhitelistEntry", &TestRunner::removeOriginAcce
ssWhitelistEntry); | 192 bindMethod("removeOriginAccessWhitelistEntry", &TestRunner::removeOriginAcce
ssWhitelistEntry); |
193 bindMethod("hasCustomPageSizeStyle", &TestRunner::hasCustomPageSizeStyle); | 193 bindMethod("hasCustomPageSizeStyle", &TestRunner::hasCustomPageSizeStyle); |
194 bindMethod("forceRedSelectionColors", &TestRunner::forceRedSelectionColors); | 194 bindMethod("forceRedSelectionColors", &TestRunner::forceRedSelectionColors); |
195 bindMethod("addUserScript", &TestRunner::addUserScript); | |
196 bindMethod("addUserStyleSheet", &TestRunner::addUserStyleSheet); | 195 bindMethod("addUserStyleSheet", &TestRunner::addUserStyleSheet); |
197 bindMethod("startSpeechInput", &TestRunner::startSpeechInput); | 196 bindMethod("startSpeechInput", &TestRunner::startSpeechInput); |
198 bindMethod("findString", &TestRunner::findString); | 197 bindMethod("findString", &TestRunner::findString); |
199 bindMethod("setValueForUser", &TestRunner::setValueForUser); | 198 bindMethod("setValueForUser", &TestRunner::setValueForUser); |
200 bindMethod("enableFixedLayoutMode", &TestRunner::enableFixedLayoutMode); | 199 bindMethod("enableFixedLayoutMode", &TestRunner::enableFixedLayoutMode); |
201 bindMethod("setFixedLayoutSize", &TestRunner::setFixedLayoutSize); | 200 bindMethod("setFixedLayoutSize", &TestRunner::setFixedLayoutSize); |
202 bindMethod("selectionAsMarkup", &TestRunner::selectionAsMarkup); | 201 bindMethod("selectionAsMarkup", &TestRunner::selectionAsMarkup); |
203 bindMethod("setTextSubpixelPositioning", &TestRunner::setTextSubpixelPositio
ning); | 202 bindMethod("setTextSubpixelPositioning", &TestRunner::setTextSubpixelPositio
ning); |
204 bindMethod("resetPageVisibility", &TestRunner::resetPageVisibility); | 203 bindMethod("resetPageVisibility", &TestRunner::resetPageVisibility); |
205 bindMethod("setPageVisibility", &TestRunner::setPageVisibility); | 204 bindMethod("setPageVisibility", &TestRunner::setPageVisibility); |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 return; | 1256 return; |
1258 result->set(frame->hasCustomPageSizeStyle(pageIndex)); | 1257 result->set(frame->hasCustomPageSizeStyle(pageIndex)); |
1259 } | 1258 } |
1260 | 1259 |
1261 void TestRunner::forceRedSelectionColors(const CppArgumentList& arguments, CppVa
riant* result) | 1260 void TestRunner::forceRedSelectionColors(const CppArgumentList& arguments, CppVa
riant* result) |
1262 { | 1261 { |
1263 result->setNull(); | 1262 result->setNull(); |
1264 m_webView->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000, 0xffc0c0c0
); | 1263 m_webView->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000, 0xffc0c0c0
); |
1265 } | 1264 } |
1266 | 1265 |
1267 void TestRunner::addUserScript(const CppArgumentList& arguments, CppVariant* res
ult) | |
1268 { | |
1269 result->setNull(); | |
1270 if (arguments.size() < 3 || !arguments[0].isString() || !arguments[1].isBool
() || !arguments[2].isBool()) | |
1271 return; | |
1272 WebView::addUserScript( | |
1273 cppVariantToWebString(arguments[0]), WebVector<WebString>(), | |
1274 arguments[1].toBoolean() ? WebView::UserScriptInjectAtDocumentStart : We
bView::UserScriptInjectAtDocumentEnd, | |
1275 arguments[2].toBoolean() ? WebView::UserContentInjectInAllFrames : WebVi
ew::UserContentInjectInTopFrameOnly); | |
1276 } | |
1277 | |
1278 void TestRunner::addUserStyleSheet(const CppArgumentList& arguments, CppVariant*
result) | 1266 void TestRunner::addUserStyleSheet(const CppArgumentList& arguments, CppVariant*
result) |
1279 { | 1267 { |
1280 result->setNull(); | 1268 result->setNull(); |
1281 if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isBool
()) | 1269 if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isBool
()) |
1282 return; | 1270 return; |
1283 WebView::addUserStyleSheet( | 1271 WebView::addUserStyleSheet( |
1284 cppVariantToWebString(arguments[0]), WebVector<WebString>(), | 1272 cppVariantToWebString(arguments[0]), WebVector<WebString>(), |
1285 arguments[1].toBoolean() ? WebView::UserContentInjectInAllFrames : WebVi
ew::UserContentInjectInTopFrameOnly, | 1273 arguments[1].toBoolean() ? WebView::UserContentInjectInAllFrames : WebVi
ew::UserContentInjectInTopFrameOnly, |
1286 // Chromium defaults to InjectInSubsequentDocuments, but for compatibili
ty | 1274 // Chromium defaults to InjectInSubsequentDocuments, but for compatibili
ty |
1287 // with the other ports' DRTs, we use UserStyleInjectInExistingDocuments
. | 1275 // with the other ports' DRTs, we use UserStyleInjectInExistingDocuments
. |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2042 result->setNull(); | 2030 result->setNull(); |
2043 } | 2031 } |
2044 | 2032 |
2045 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) | 2033 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) |
2046 { | 2034 { |
2047 m_pointerLockPlannedResult = PointerLockWillFailSync; | 2035 m_pointerLockPlannedResult = PointerLockWillFailSync; |
2048 result->setNull(); | 2036 result->setNull(); |
2049 } | 2037 } |
2050 | 2038 |
2051 } | 2039 } |
OLD | NEW |