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 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 | 1164 |
1165 void TestRunner::setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&
arguments, CppVariant* result) | 1165 void TestRunner::setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&
arguments, CppVariant* result) |
1166 { | 1166 { |
1167 if (arguments.size() != 2 || !arguments[0].isBool() || !arguments[1].isStrin
g()) | 1167 if (arguments.size() != 2 || !arguments[0].isBool() || !arguments[1].isStrin
g()) |
1168 return; | 1168 return; |
1169 m_webView->setDomainRelaxationForbidden(cppVariantToBool(arguments[0]), cppV
ariantToWebString(arguments[1])); | 1169 m_webView->setDomainRelaxationForbidden(cppVariantToBool(arguments[0]), cppV
ariantToWebString(arguments[1])); |
1170 } | 1170 } |
1171 | 1171 |
1172 void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(const CppArgumentLi
st& arguments, CppVariant* result) | 1172 void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(const CppArgumentLi
st& arguments, CppVariant* result) |
1173 { | 1173 { |
1174 v8::HandleScope scope; | 1174 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
1175 WebVector<v8::Local<v8::Value> > values; | 1175 WebVector<v8::Local<v8::Value> > values; |
1176 if (arguments.size() >= 2 && arguments[0].isNumber() && arguments[1].isStrin
g()) { | 1176 if (arguments.size() >= 2 && arguments[0].isNumber() && arguments[1].isStrin
g()) { |
1177 WebScriptSource source(cppVariantToWebString(arguments[1])); | 1177 WebScriptSource source(cppVariantToWebString(arguments[1])); |
1178 // This relies on the iframe focusing itself when it loads. This is a bi
t | 1178 // This relies on the iframe focusing itself when it loads. This is a bi
t |
1179 // sketchy, but it seems to be what other tests do. | 1179 // sketchy, but it seems to be what other tests do. |
1180 m_webView->focusedFrame()->executeScriptInIsolatedWorld(arguments[0].toI
nt32(), &source, 1, 1, &values); | 1180 m_webView->focusedFrame()->executeScriptInIsolatedWorld(arguments[0].toI
nt32(), &source, 1, 1, &values); |
1181 } | 1181 } |
1182 result->setNull(); | 1182 result->setNull(); |
1183 // Since only one script was added, only one result is expected | 1183 // Since only one script was added, only one result is expected |
1184 if (values.size() == 1 && !values[0].IsEmpty()) { | 1184 if (values.size() == 1 && !values[0].IsEmpty()) { |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2144 result->setNull(); | 2144 result->setNull(); |
2145 } | 2145 } |
2146 | 2146 |
2147 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) | 2147 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) |
2148 { | 2148 { |
2149 m_pointerLockPlannedResult = PointerLockWillFailSync; | 2149 m_pointerLockPlannedResult = PointerLockWillFailSync; |
2150 result->setNull(); | 2150 result->setNull(); |
2151 } | 2151 } |
2152 | 2152 |
2153 } | 2153 } |
OLD | NEW |