| OLD | NEW |
| 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/renderer/webkit_test_runner.h" | 5 #include "content/shell/renderer/webkit_test_runner.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <clocale> | 8 #include <clocale> |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 if (id == routing_ids_.end()) { | 551 if (id == routing_ids_.end()) { |
| 552 NOTREACHED(); | 552 NOTREACHED(); |
| 553 return std::string(); | 553 return std::string(); |
| 554 } | 554 } |
| 555 return DumpBackForwardList(session_histories_[pos], | 555 return DumpBackForwardList(session_histories_[pos], |
| 556 current_entry_indexes_[pos]); | 556 current_entry_indexes_[pos]); |
| 557 } | 557 } |
| 558 | 558 |
| 559 // RenderViewObserver -------------------------------------------------------- | 559 // RenderViewObserver -------------------------------------------------------- |
| 560 | 560 |
| 561 void WebKitTestRunner::DidClearWindowObject(WebLocalFrame* frame, | 561 void WebKitTestRunner::DidClearWindowObject(WebLocalFrame* frame) { |
| 562 int world_id) { | |
| 563 WebTestingSupport::injectInternalsObject(frame); | 562 WebTestingSupport::injectInternalsObject(frame); |
| 564 if (world_id == 0) { | 563 ShellRenderProcessObserver::GetInstance()->test_interfaces()->bindTo(frame); |
| 565 ShellRenderProcessObserver::GetInstance()->test_interfaces()->bindTo(frame); | 564 GCController::Install(frame); |
| 566 GCController::Install(frame); | |
| 567 } | |
| 568 } | 565 } |
| 569 | 566 |
| 570 bool WebKitTestRunner::OnMessageReceived(const IPC::Message& message) { | 567 bool WebKitTestRunner::OnMessageReceived(const IPC::Message& message) { |
| 571 bool handled = true; | 568 bool handled = true; |
| 572 IPC_BEGIN_MESSAGE_MAP(WebKitTestRunner, message) | 569 IPC_BEGIN_MESSAGE_MAP(WebKitTestRunner, message) |
| 573 IPC_MESSAGE_HANDLER(ShellViewMsg_SetTestConfiguration, | 570 IPC_MESSAGE_HANDLER(ShellViewMsg_SetTestConfiguration, |
| 574 OnSetTestConfiguration) | 571 OnSetTestConfiguration) |
| 575 IPC_MESSAGE_HANDLER(ShellViewMsg_SessionHistory, OnSessionHistory) | 572 IPC_MESSAGE_HANDLER(ShellViewMsg_SessionHistory, OnSessionHistory) |
| 576 IPC_MESSAGE_HANDLER(ShellViewMsg_Reset, OnReset) | 573 IPC_MESSAGE_HANDLER(ShellViewMsg_Reset, OnReset) |
| 577 IPC_MESSAGE_HANDLER(ShellViewMsg_NotifyDone, OnNotifyDone) | 574 IPC_MESSAGE_HANDLER(ShellViewMsg_NotifyDone, OnNotifyDone) |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 | 747 |
| 751 leak_detector_->TryLeakDetection(main_frame); | 748 leak_detector_->TryLeakDetection(main_frame); |
| 752 } | 749 } |
| 753 | 750 |
| 754 void WebKitTestRunner::ReportLeakDetectionResult( | 751 void WebKitTestRunner::ReportLeakDetectionResult( |
| 755 const LeakDetectionResult& report) { | 752 const LeakDetectionResult& report) { |
| 756 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 753 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 757 } | 754 } |
| 758 | 755 |
| 759 } // namespace content | 756 } // namespace content |
| OLD | NEW |