Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: webkit/tools/test_shell/layout_test_controller.cc

Issue 159782: Actually process the work queue if layoutTestController.waitUntilDone() is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698