| 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/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 " checkState();" | 1031 " checkState();" |
| 1032 " document.addEventListener('readystatechange', checkState);" | 1032 " document.addEventListener('readystatechange', checkState);" |
| 1033 "})();", | 1033 "})();", |
| 1034 &result)); | 1034 &result)); |
| 1035 return result == "pageLoadComplete"; | 1035 return result == "pageLoadComplete"; |
| 1036 } | 1036 } |
| 1037 | 1037 |
| 1038 void EnableAccessibilityForWebContents(WebContents* web_contents) { | 1038 void EnableAccessibilityForWebContents(WebContents* web_contents) { |
| 1039 WebContentsImpl* web_contents_impl = | 1039 WebContentsImpl* web_contents_impl = |
| 1040 static_cast<WebContentsImpl*>(web_contents); | 1040 static_cast<WebContentsImpl*>(web_contents); |
| 1041 web_contents_impl->SetAccessibilityMode(ACCESSIBILITY_MODE_COMPLETE); | 1041 web_contents_impl->SetAccessibilityMode(AccessibilityMode::COMPLETE); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 void WaitForAccessibilityFocusChange() { | 1044 void WaitForAccessibilityFocusChange() { |
| 1045 scoped_refptr<content::MessageLoopRunner> loop_runner( | 1045 scoped_refptr<content::MessageLoopRunner> loop_runner( |
| 1046 new content::MessageLoopRunner); | 1046 new content::MessageLoopRunner); |
| 1047 BrowserAccessibilityManager::SetFocusChangeCallbackForTesting( | 1047 BrowserAccessibilityManager::SetFocusChangeCallbackForTesting( |
| 1048 loop_runner->QuitClosure()); | 1048 loop_runner->QuitClosure()); |
| 1049 loop_runner->Run(); | 1049 loop_runner->Run(); |
| 1050 } | 1050 } |
| 1051 | 1051 |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 IPC::IpcSecurityTestUtil::PwnMessageReceived( | 1855 IPC::IpcSecurityTestUtil::PwnMessageReceived( |
| 1856 process->GetChannel(), | 1856 process->GetChannel(), |
| 1857 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); | 1857 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); |
| 1858 | 1858 |
| 1859 // If this started an async operation, wait for it to complete. | 1859 // If this started an async operation, wait for it to complete. |
| 1860 if (waiter.did_start_update()) | 1860 if (waiter.did_start_update()) |
| 1861 waiter.WaitForEndUpdate(); | 1861 waiter.WaitForEndUpdate(); |
| 1862 } | 1862 } |
| 1863 | 1863 |
| 1864 } // namespace content | 1864 } // namespace content |
| OLD | NEW |