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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 render_view_host->GetRoutingID(), stitched_layout_dump)); | 755 render_view_host->GetRoutingID(), stitched_layout_dump)); |
756 } | 756 } |
757 | 757 |
758 void BlinkTestController::OnPrintMessage(const std::string& message) { | 758 void BlinkTestController::OnPrintMessage(const std::string& message) { |
759 printer_->AddMessageRaw(message); | 759 printer_->AddMessageRaw(message); |
760 } | 760 } |
761 | 761 |
762 void BlinkTestController::OnOverridePreferences(const WebPreferences& prefs) { | 762 void BlinkTestController::OnOverridePreferences(const WebPreferences& prefs) { |
763 should_override_prefs_ = true; | 763 should_override_prefs_ = true; |
764 prefs_ = prefs; | 764 prefs_ = prefs; |
765 | |
766 // Notifies the main RenderViewHost that Blink preferences changed so to avoid | |
767 // re-usage of cached preferences that are now stale. | |
768 RenderViewHost* main_render_view_host = | |
769 main_window_->web_contents()->GetRenderViewHost(); | |
770 main_render_view_host->OnWebkitPreferencesChanged(); | |
771 } | 765 } |
772 | 766 |
773 void BlinkTestController::OnClearDevToolsLocalStorage() { | 767 void BlinkTestController::OnClearDevToolsLocalStorage() { |
774 ShellBrowserContext* browser_context = | 768 ShellBrowserContext* browser_context = |
775 ShellContentBrowserClient::Get()->browser_context(); | 769 ShellContentBrowserClient::Get()->browser_context(); |
776 StoragePartition* storage_partition = | 770 StoragePartition* storage_partition = |
777 BrowserContext::GetStoragePartition(browser_context, NULL); | 771 BrowserContext::GetStoragePartition(browser_context, NULL); |
778 storage_partition->GetDOMStorageContext()->DeleteLocalStorage( | 772 storage_partition->GetDOMStorageContext()->DeleteLocalStorage( |
779 content::LayoutTestDevToolsFrontend::GetDevToolsPathAsURL("", "") | 773 content::LayoutTestDevToolsFrontend::GetDevToolsPathAsURL("", "") |
780 .GetOrigin()); | 774 .GetOrigin()); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 } else { | 933 } else { |
940 printer_->AddErrorMessage(base::StringPrintf( | 934 printer_->AddErrorMessage(base::StringPrintf( |
941 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 935 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
942 event_name.c_str())); | 936 event_name.c_str())); |
943 return; | 937 return; |
944 } | 938 } |
945 bluetooth_chooser_factory_->SendEvent(event, argument); | 939 bluetooth_chooser_factory_->SendEvent(event, argument); |
946 } | 940 } |
947 | 941 |
948 } // namespace content | 942 } // namespace content |
OLD | NEW |