Commit 307b67f1 authored by jochen@chromium.org's avatar jochen@chromium.org

Rename layoutTestController to testRunner.

I should come up with a better name than LayoutTestController{Host,} for content_shell

The extension docs are updated here: https://chromiumcodereview.appspot.com/10825200/

The binaries in chrome/test/data/extensions/uitest don't actually invoke LTC

BUG=none
TEST=still works after WK roll


Review URL: https://chromiumcodereview.appspot.com/10827182

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150320 0039d316-1c4b-4281-b951-d872f2087c98
parent 798668da
......@@ -217,8 +217,8 @@ foreach $content_type ( @content_type) {
print OUT "This HTML is used to test HTTP content-type \"$content_type\"".
" by having multiple iframes render different types of content for the".
" same HTTP content-type header.\n";
print OUT "<script>\n if(window.layoutTestController)\n " .
"window.layoutTestController.waitUntilDone();\n</script>\n";
print OUT "<script>\n if(window.testRunner)\n " .
"window.testRunner.waitUntilDone();\n</script>\n";
print OUT "<html>\n<body>\n<br>Well here are the frames !<br>\n";
foreach $parameter ( @parameter ) {
......@@ -239,8 +239,8 @@ foreach $content_type ( @content_type) {
}
print OUT "</body>\n</html>\n";
print OUT "<script>\n if(window.layoutTestController)\n ".
"layoutTestController.notifyDone();\n</script>";
print OUT "<script>\n if(window.testRunner)\n ".
"testRunner.notifyDone();\n</script>";
close OUT;
}
......
......@@ -78,7 +78,7 @@ IN_PROC_BROWSER_TEST_F(AppCacheLayoutTest, DISABLED_PHP) {
};
// This tests loads a data url which calls notifyDone, this just
// doesn't work with the layoutTestController in this test harness.
// doesn't work with the testRunner in this test harness.
// "fail-on-update.html",
// Flaky for reasons i don't yet see?
......
......@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var layoutTestController = layoutTestController || {};
var testRunner = testRunner || {};
var accessibilityController = accessibilityController || {};
var gamepadController = gamepadController || {};
......@@ -43,8 +42,7 @@ var textInputController = textInputController || {};
{value: SetShouldStayOnPageAfterHandlingBeforeUnload});
Object.defineProperty(this, "waitUntilDone", {value: SetWaitUntilDone});
}
LayoutTestController.prototype = DefaultHandler("layoutTestController");
layoutTestController = new LayoutTestController();
LayoutTestController.prototype = DefaultHandler("testRunner");
testRunner = new LayoutTestController();
var AccessibilityController = function() {}
......
......@@ -42,7 +42,7 @@ class LayoutTestControllerHost : public RenderViewHostObserver {
void OnTextDump(const std::string& dump);
void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image);
// layoutTestController handlers.
// testRunner handlers.
void OnNotifyDone();
void OnDumpAsText();
void OnDumpChildFramesAsText();
......
......@@ -35,7 +35,7 @@ IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ImageDump,
// The main frame of the render view finished loading.
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_DidFinishLoad)
// The following messages correspond to methods of the layoutTestController.
// The following messages correspond to methods of the testRunner.
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_NotifyDone)
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_DumpAsText)
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_DumpChildFramesAsText)
......
......@@ -67,7 +67,7 @@ void ScrapeResultFromBrowser(content::Shell* window, std::string* actual_text) {
static const std::string preamble =
"\n<script>\n"
"function LayoutTestController() {\n"
"function TestRunner() {\n"
" this.wait_until_done_ = false;\n"
" this.dumpAsText = function () {};\n"
" this.waitUntilDone = function () {\n"
......@@ -78,14 +78,13 @@ static const std::string preamble =
" }\n"
" this.overridePreference = function () {}\n"
" this.OnEvent = function () {\n"
" if (!layoutTestController.wait_until_done_)\n"
" layoutTestController.notifyDone();\n"
" if (!testRunner.wait_until_done_)\n"
" testRunner.notifyDone();\n"
" }\n"
" this.workerThreadCount = 0; \n"
"}\n"
"window.layoutTestController = new LayoutTestController();\n"
"window.testRunner = window.layoutTestController;\n"
"window.addEventListener('load', layoutTestController.OnEvent, false);\n"
"window.testRunner = new TestRunner();\n"
"window.addEventListener('load', testRunner.OnEvent, false);\n"
"</script>";
}
......
......@@ -71,7 +71,7 @@ int NumberOfPages(WebKit::WebFrame* web_frame,
string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive);
// Returns a dump of the given history state suitable for implementing the
// dumpBackForwardList command of the layoutTestController.
// dumpBackForwardList command of the testRunner.
WEBKIT_GLUE_EXPORT string16 DumpHistoryState(const std::string& history_state,
int indent,
bool is_current);
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -45,7 +45,7 @@ class SimpleDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
int64 GetFileSize(const string16& vfs_file_name);
int64 GetSpaceAvailable(const string16& origin_identifier);
// For use by LayoutTestController, called on the main thread.
// For use by testRunner, called on the main thread.
void ClearAllDatabases();
void SetDatabaseQuota(int64 quota);
......
......@@ -20,7 +20,7 @@ class TestNotificationPresenter : public WebKit::WebNotificationPresenter {
void Reset();
// Called by the LayoutTestController to simulate a user granting
// Called by the testRunner to simulate a user granting
// permission.
void grantPermission(const std::string& origin);
......
......@@ -433,7 +433,7 @@ void TestShell::CallJSGC() {
WebView* TestShell::CreateWebView() {
// If we're running layout tests, only open a new window if the test has
// called layoutTestController.setCanOpenWindows()
// called testRunner.setCanOpenWindows()
if (layout_test_mode_)
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment