Index: webkit/tools/test_shell/layout_test_controller.cc |
=================================================================== |
--- webkit/tools/test_shell/layout_test_controller.cc (revision 22041) |
+++ webkit/tools/test_shell/layout_test_controller.cc (working copy) |
@@ -134,7 +134,7 @@ |
BindMethod("setUseDashboardCompatibilityMode", &LayoutTestController::setUseDashboardCompatibilityMode); |
BindMethod("setXSSAuditorEnabled", &LayoutTestController::setXSSAuditorEnabled); |
- BindMethod("queueScriptInIsolatedWorld", &LayoutTestController::queueScriptInIsolatedWorld); |
+ BindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld); |
// The fallback method is called when an unknown method is invoked. |
BindFallbackMethod(&LayoutTestController::fallbackMethod); |
@@ -346,18 +346,6 @@ |
string script_; |
}; |
-class WorkItemIsolatedWorldScript : public LayoutTestController::WorkItem { |
- public: |
- WorkItemIsolatedWorldScript(const string& script) : script_(script) {} |
- bool Run(TestShell* shell) { |
- WebScriptSource source(WebString::fromUTF8(script_)); |
- shell->webView()->GetMainFrame()->ExecuteScriptInNewWorld(&source, 1); |
- return false; |
- } |
- private: |
- string script_; |
-}; |
- |
void LayoutTestController::queueLoadingScript( |
const CppArgumentList& args, CppVariant* result) { |
if (args.size() > 0 && args[0].isString()) |
@@ -784,10 +772,12 @@ |
result->SetNull(); |
} |
-void LayoutTestController::queueScriptInIsolatedWorld( |
+void LayoutTestController::evaluateScriptInIsolatedWorld( |
const CppArgumentList& args, CppVariant* result) { |
- if (args.size() > 0 && args[0].isString()) |
- work_queue_.AddWork(new WorkItemIsolatedWorldScript(args[0].ToString())); |
+ if (args.size() > 0 && args[0].isString()) { |
+ WebScriptSource source(WebString::fromUTF8(args[0].ToString())); |
+ shell_->webView()->GetMainFrame()->ExecuteScriptInNewWorld(&source, 1); |
+ } |
result->SetNull(); |
} |