| 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/layout_test/blink_test_controller.h" | 5 #include "content/shell/browser/layout_test/blink_test_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 should_override_prefs_ = true; | 758 should_override_prefs_ = true; |
| 759 prefs_ = prefs; | 759 prefs_ = prefs; |
| 760 } | 760 } |
| 761 | 761 |
| 762 void BlinkTestController::OnClearDevToolsLocalStorage() { | 762 void BlinkTestController::OnClearDevToolsLocalStorage() { |
| 763 ShellBrowserContext* browser_context = | 763 ShellBrowserContext* browser_context = |
| 764 ShellContentBrowserClient::Get()->browser_context(); | 764 ShellContentBrowserClient::Get()->browser_context(); |
| 765 StoragePartition* storage_partition = | 765 StoragePartition* storage_partition = |
| 766 BrowserContext::GetStoragePartition(browser_context, NULL); | 766 BrowserContext::GetStoragePartition(browser_context, NULL); |
| 767 storage_partition->GetDOMStorageContext()->DeleteLocalStorage( | 767 storage_partition->GetDOMStorageContext()->DeleteLocalStorage( |
| 768 content::LayoutTestDevToolsFrontend::GetDevToolsPathAsURL("", "") | 768 content::LayoutTestDevToolsFrontend::GetDevToolsPathAsURL("") |
| 769 .GetOrigin()); | 769 .GetOrigin()); |
| 770 } | 770 } |
| 771 | 771 |
| 772 void BlinkTestController::OnShowDevTools(const std::string& settings, | 772 void BlinkTestController::OnShowDevTools(const std::string& settings, |
| 773 const std::string& frontend_url) { | 773 const std::string& frontend_url) { |
| 774 if (!devtools_frontend_) { | 774 if (!devtools_frontend_) { |
| 775 devtools_frontend_ = LayoutTestDevToolsFrontend::Show( | 775 devtools_frontend_ = LayoutTestDevToolsFrontend::Show( |
| 776 main_window_->web_contents(), settings, frontend_url); | 776 main_window_->web_contents(), settings, frontend_url); |
| 777 } else { | 777 } else { |
| 778 devtools_frontend_->ReuseFrontend(settings, frontend_url); | 778 devtools_frontend_->ReuseFrontend(settings, frontend_url); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 } else { | 928 } else { |
| 929 printer_->AddErrorMessage(base::StringPrintf( | 929 printer_->AddErrorMessage(base::StringPrintf( |
| 930 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 930 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
| 931 event_name.c_str())); | 931 event_name.c_str())); |
| 932 return; | 932 return; |
| 933 } | 933 } |
| 934 bluetooth_chooser_factory_->SendEvent(event, argument); | 934 bluetooth_chooser_factory_->SendEvent(event, argument); |
| 935 } | 935 } |
| 936 | 936 |
| 937 } // namespace content | 937 } // namespace content |
| OLD | NEW |