Diff
Modified: trunk/Tools/ChangeLog (124704 => 124705)
--- trunk/Tools/ChangeLog 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/ChangeLog 2012-08-04 22:58:30 UTC (rev 124705)
@@ -1,3 +1,36 @@
+2012-08-03 Ryosuke Niwa <[email protected]>
+
+ Stop exposing window.layoutTestController in layout tests in favor of window.testRunner
+ https://bugs.webkit.org/show_bug.cgi?id=93173
+
+ Reviewed by Adam Barth.
+
+ Don't expose window.layoutTestController since all layout tests use window.testRunner
+ instead of window.layoutTestController as of r124685.
+
+ We can safely rename classes and files to use TestRunner once this patch is landed.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::makeWindowObject):
+ * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
+ (notifyTestCompletion):
+ * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
+ (PluginTest::waitUntilDone):
+ (PluginTest::notifyDone):
+ * DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp:
+ (ConvertPoint::NPP_SetWindow):
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (handleEventCarbon):
+ (handleEventCocoa):
+ (handleEventWin):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::bindJSObjectsToWindow):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::initJSObjects):
+ * Scripts/bencher:
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::makeWindowObject):
+
2012-08-04 Ilya Tikhonovsky <[email protected]>
Unreviewed: Web Inspector: extend instrumenting methods set in ReportMemoryUsage clang plugin
Modified: trunk/Tools/DumpRenderTree/LayoutTestController.cpp (124704 => 124705)
--- trunk/Tools/DumpRenderTree/LayoutTestController.cpp 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.cpp 2012-08-04 22:58:30 UTC (rev 124705)
@@ -2210,7 +2210,6 @@
void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
{
- JSRetainPtr<JSStringRef> layoutTestContollerStr(Adopt, JSStringCreateWithUTF8CString("layoutTestController"));
JSRetainPtr<JSStringRef> testRunnerStr(Adopt, JSStringCreateWithUTF8CString("testRunner"));
ref();
ref();
@@ -2219,7 +2218,6 @@
JSValueRef layoutTestContollerObject = JSObjectMake(context, classRef, this);
JSClassRelease(classRef);
- JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), layoutTestContollerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
JSObjectSetProperty(context, windowObject, testRunnerStr.get(), layoutTestContollerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
}
Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp (124704 => 124705)
--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp 2012-08-04 22:58:30 UTC (rev 124705)
@@ -892,8 +892,8 @@
{
NPVariant result;
NPString script;
- script.UTF8Characters = "_javascript_:window.layoutTestController.notifyDone();";
- script.UTF8Length = strlen("_javascript_:window.layoutTestController.notifyDone();");
+ script.UTF8Characters = "_javascript_:window.testRunner.notifyDone();";
+ script.UTF8Length = strlen("_javascript_:window.testRunner.notifyDone();");
browser->evaluate(npp, object, &script, &result);
browser->releasevariantvalue(&result);
}
Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp (124704 => 124705)
--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp 2012-08-04 22:58:30 UTC (rev 124705)
@@ -254,12 +254,12 @@
void PluginTest::waitUntilDone()
{
- executeScript("layoutTestController.waitUntilDone()");
+ executeScript("testRunner.waitUntilDone()");
}
void PluginTest::notifyDone()
{
- executeScript("layoutTestController.notifyDone()");
+ executeScript("testRunner.notifyDone()");
}
void PluginTest::registerCreateTestFunction(const string& identifier, CreateTestFunction createTestFunction)
Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp (124704 => 124705)
--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp 2012-08-04 22:58:30 UTC (rev 124705)
@@ -74,7 +74,7 @@
if (testConvert())
executeScript("document.getElementById('result').innerHTML = 'SUCCESS!'");
- executeScript("setTimeout(function() { layoutTestController.notifyDone() }, 0)");
+ executeScript("setTimeout(function() { testRunner.notifyDone() }, 0)");
return NPERR_NO_ERROR;
}
};
Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp (124704 => 124705)
--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp 2012-08-04 22:58:30 UTC (rev 124705)
@@ -506,7 +506,7 @@
if (obj->testKeyboardFocusForPlugins) {
obj->eventLogging = false;
obj->testKeyboardFocusForPlugins = FALSE;
- executeScript(obj, "layoutTestController.notifyDone();");
+ executeScript(obj, "testRunner.notifyDone();");
}
break;
case autoKey:
@@ -599,7 +599,7 @@
if (obj->testKeyboardFocusForPlugins) {
obj->eventLogging = false;
obj->testKeyboardFocusForPlugins = FALSE;
- executeScript(obj, "layoutTestController.notifyDone();");
+ executeScript(obj, "testRunner.notifyDone();");
}
}
return 1;
@@ -723,7 +723,7 @@
if (obj->testKeyboardFocusForPlugins) {
obj->eventLogging = false;
obj->testKeyboardFocusForPlugins = FALSE;
- executeScript(obj, "layoutTestController.notifyDone();");
+ executeScript(obj, "testRunner.notifyDone();");
}
break;
case WM_LBUTTONDOWN:
Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (124704 => 124705)
--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2012-08-04 22:58:30 UTC (rev 124705)
@@ -726,7 +726,6 @@
{
WebTestingSupport::injectInternalsObject(frame);
m_testInterfaces->bindTo(frame);
- m_layoutTestController->bindToJavascript(frame, WebString::fromUTF8("layoutTestController"));
m_layoutTestController->bindToJavascript(frame, WebString::fromUTF8("testRunner"));
}
Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp (124704 => 124705)
--- trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp 2012-08-04 22:58:30 UTC (rev 124705)
@@ -733,7 +733,6 @@
{
QWebFrame *frame = qobject_cast<QWebFrame*>(sender());
Q_ASSERT(frame);
- frame->addToJavaScriptWindowObject(QLatin1String("layoutTestController"), m_controller);
frame->addToJavaScriptWindowObject(QLatin1String("testRunner"), m_controller);
frame->addToJavaScriptWindowObject(QLatin1String("eventSender"), m_eventSender);
frame->addToJavaScriptWindowObject(QLatin1String("textInputController"), m_textInputController);
Modified: trunk/Tools/Scripts/bencher (124704 => 124705)
--- trunk/Tools/Scripts/bencher 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/Scripts/bencher 2012-08-04 22:58:30 UTC (rev 124705)
@@ -717,9 +717,9 @@
preCode = Benchfile.create("bencher-pre") {
| file |
- doublePuts($stderr,file,"if (window.layoutTestController) {")
- doublePuts($stderr,file," layoutTestController.dumpAsText(window.enablePixelTesting);")
- doublePuts($stderr,file," layoutTestController.waitUntilDone();")
+ doublePuts($stderr,file,"if (window.testRunner) {")
+ doublePuts($stderr,file," testRunner.dumpAsText(window.enablePixelTesting);")
+ doublePuts($stderr,file," testRunner.waitUntilDone();")
doublePuts($stderr,file,"}")
doublePuts($stderr,file,"")
doublePuts($stderr,file,"function debug(msg)")
@@ -730,7 +730,7 @@
doublePuts($stderr,file,"}")
doublePuts($stderr,file,"")
doublePuts($stderr,file,"function quit() {")
- doublePuts($stderr,file," layoutTestController.notifyDone();")
+ doublePuts($stderr,file," testRunner.notifyDone();")
doublePuts($stderr,file,"}")
doublePuts($stderr,file,"")
doublePuts($stderr,file,"__bencher_continuation=null;")
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp (124704 => 124705)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp 2012-08-04 22:49:18 UTC (rev 124704)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp 2012-08-04 22:58:30 UTC (rev 124705)
@@ -417,7 +417,6 @@
void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
{
- setProperty(context, windowObject, "layoutTestController", this, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
setProperty(context, windowObject, "testRunner", this, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
}