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

Side by Side Diff: content/shell/layout_test_controller_host.cc

Issue 10740002: Stub out not yet implemented controller methods, so we don't have to wait for timeouts but fail imm… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/layout_test_controller_host.h ('k') | content/shell/shell_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/layout_test_controller_host.h" 5 #include "content/shell/layout_test_controller_host.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "content/public/browser/render_view_host.h" 8 #include "content/public/browser/render_view_host.h"
9 #include "content/shell/shell_messages.h" 9 #include "content/shell/shell_messages.h"
10 #include "webkit/support/webkit_support_gfx.h" 10 #include "webkit/support/webkit_support_gfx.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ImageDump, OnImageDump) 84 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ImageDump, OnImageDump)
85 IPC_MESSAGE_HANDLER(ShellViewHostMsg_NotifyDone, OnNotifyDone) 85 IPC_MESSAGE_HANDLER(ShellViewHostMsg_NotifyDone, OnNotifyDone)
86 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DumpAsText, OnDumpAsText) 86 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DumpAsText, OnDumpAsText)
87 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DumpChildFramesAsText, 87 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DumpChildFramesAsText,
88 OnDumpChildFramesAsText) 88 OnDumpChildFramesAsText)
89 IPC_MESSAGE_HANDLER(ShellViewHostMsg_SetPrinting, OnSetPrinting) 89 IPC_MESSAGE_HANDLER(ShellViewHostMsg_SetPrinting, OnSetPrinting)
90 IPC_MESSAGE_HANDLER( 90 IPC_MESSAGE_HANDLER(
91 ShellViewHostMsg_SetShouldStayOnPageAfterHandlingBeforeUnload, 91 ShellViewHostMsg_SetShouldStayOnPageAfterHandlingBeforeUnload,
92 OnSetShouldStayOnPageAfterHandlingBeforeUnload) 92 OnSetShouldStayOnPageAfterHandlingBeforeUnload)
93 IPC_MESSAGE_HANDLER(ShellViewHostMsg_WaitUntilDone, OnWaitUntilDone) 93 IPC_MESSAGE_HANDLER(ShellViewHostMsg_WaitUntilDone, OnWaitUntilDone)
94 IPC_MESSAGE_HANDLER(ShellViewHostMsg_NotImplemented, OnNotImplemented)
94 IPC_MESSAGE_UNHANDLED(handled = false) 95 IPC_MESSAGE_UNHANDLED(handled = false)
95 IPC_END_MESSAGE_MAP() 96 IPC_END_MESSAGE_MAP()
96 97
97 return handled; 98 return handled;
98 } 99 }
99 100
100 void LayoutTestControllerHost::OnDidFinishLoad() { 101 void LayoutTestControllerHost::OnDidFinishLoad() {
101 if (wait_until_done_) 102 if (wait_until_done_)
102 return; 103 return;
103 104
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return; 186 return;
186 watchdog_.Reset(base::Bind(&LayoutTestControllerHost::TimeoutHandler, 187 watchdog_.Reset(base::Bind(&LayoutTestControllerHost::TimeoutHandler,
187 base::Unretained(this))); 188 base::Unretained(this)));
188 MessageLoop::current()->PostDelayedTask( 189 MessageLoop::current()->PostDelayedTask(
189 FROM_HERE, 190 FROM_HERE,
190 watchdog_.callback(), 191 watchdog_.callback(),
191 base::TimeDelta::FromMilliseconds(kTestTimeoutMilliseconds)); 192 base::TimeDelta::FromMilliseconds(kTestTimeoutMilliseconds));
192 wait_until_done_ = true; 193 wait_until_done_ = true;
193 } 194 }
194 195
196 void LayoutTestControllerHost::OnNotImplemented(
197 const std::string& object_name,
198 const std::string& property_name) {
199 if (captured_dump_)
200 return;
201 printf("FAIL: NOT IMPLEMENTED: %s.%s\n",
202 object_name.c_str(), property_name.c_str());
203 fprintf(stderr, "FAIL: NOT IMPLEMENTED: %s.%s\n",
204 object_name.c_str(), property_name.c_str());
205 watchdog_.Cancel();
206 CaptureDump();
207 }
208
195 } // namespace content 209 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/layout_test_controller_host.h ('k') | content/shell/shell_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698