| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/webkit_test_controller.h" | 5 #include "content/shell/browser/webkit_test_controller.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 should_override_prefs_ = true; | 576 should_override_prefs_ = true; |
| 577 prefs_ = prefs; | 577 prefs_ = prefs; |
| 578 } | 578 } |
| 579 | 579 |
| 580 void WebKitTestController::OnClearDevToolsLocalStorage() { | 580 void WebKitTestController::OnClearDevToolsLocalStorage() { |
| 581 ShellBrowserContext* browser_context = | 581 ShellBrowserContext* browser_context = |
| 582 ShellContentBrowserClient::Get()->browser_context(); | 582 ShellContentBrowserClient::Get()->browser_context(); |
| 583 StoragePartition* storage_partition = | 583 StoragePartition* storage_partition = |
| 584 BrowserContext::GetStoragePartition(browser_context, NULL); | 584 BrowserContext::GetStoragePartition(browser_context, NULL); |
| 585 storage_partition->GetDOMStorageContext()->DeleteLocalStorage( | 585 storage_partition->GetDOMStorageContext()->DeleteLocalStorage( |
| 586 content::LayoutTestDevToolsFrontend::GetDevToolsPathAsURL("", "") | 586 content::LayoutTestDevToolsFrontend::GetDevToolsPathAsURL("") |
| 587 .GetOrigin()); | 587 .GetOrigin()); |
| 588 } | 588 } |
| 589 | 589 |
| 590 void WebKitTestController::OnShowDevTools(const std::string& settings, | 590 void WebKitTestController::OnShowDevTools(const std::string& test_path, |
| 591 const std::string& frontend_url) { | 591 const std::string& frontend_url) { |
| 592 if (!devtools_frontend_) { | 592 if (!devtools_frontend_) { |
| 593 devtools_frontend_ = LayoutTestDevToolsFrontend::Show( | 593 devtools_frontend_ = LayoutTestDevToolsFrontend::Show( |
| 594 main_window_->web_contents(), settings, frontend_url); | 594 main_window_->web_contents(), test_path, frontend_url); |
| 595 } else { | 595 } else { |
| 596 devtools_frontend_->ReuseFrontend(settings, frontend_url); | 596 devtools_frontend_->ReuseFrontend(test_path, frontend_url); |
| 597 } | 597 } |
| 598 devtools_frontend_->Activate(); | 598 devtools_frontend_->Activate(); |
| 599 devtools_frontend_->Focus(); | 599 devtools_frontend_->Focus(); |
| 600 } | 600 } |
| 601 | 601 |
| 602 void WebKitTestController::OnCloseDevTools() { | 602 void WebKitTestController::OnCloseDevTools() { |
| 603 if (devtools_frontend_) | 603 if (devtools_frontend_) |
| 604 devtools_frontend_->DisconnectFromTarget(); | 604 devtools_frontend_->DisconnectFromTarget(); |
| 605 } | 605 } |
| 606 | 606 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 | 696 |
| 697 printer_->AddErrorMessage( | 697 printer_->AddErrorMessage( |
| 698 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, | 698 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, |
| 699 result.detail.c_str())); | 699 result.detail.c_str())); |
| 700 CHECK(!crash_when_leak_found_); | 700 CHECK(!crash_when_leak_found_); |
| 701 | 701 |
| 702 DiscardMainWindow(); | 702 DiscardMainWindow(); |
| 703 } | 703 } |
| 704 | 704 |
| 705 } // namespace content | 705 } // namespace content |
| OLD | NEW |