| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test_runner/test_runner.h" | 5 #include "content/shell/renderer/test_runner/test_runner.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/public/test/layouttest_support.h" | |
| 11 #include "content/shell/common/test_runner/test_preferences.h" | 10 #include "content/shell/common/test_runner/test_preferences.h" |
| 12 #include "content/shell/renderer/binding_helpers.h" | 11 #include "content/shell/renderer/binding_helpers.h" |
| 13 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" | 12 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" |
| 14 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" | 13 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" |
| 15 #include "content/shell/renderer/test_runner/test_interfaces.h" | 14 #include "content/shell/renderer/test_runner/test_interfaces.h" |
| 16 #include "content/shell/renderer/test_runner/web_content_settings.h" | 15 #include "content/shell/renderer/test_runner/web_content_settings.h" |
| 17 #include "content/shell/renderer/test_runner/web_test_delegate.h" | 16 #include "content/shell/renderer/test_runner/web_test_delegate.h" |
| 18 #include "content/shell/renderer/test_runner/web_test_proxy.h" | 17 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
| 19 #include "gin/arguments.h" | 18 #include "gin/arguments.h" |
| 20 #include "gin/array_buffer.h" | 19 #include "gin/array_buffer.h" |
| (...skipping 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2859 new InvokeCallbackTask(this, callback)); | 2858 new InvokeCallbackTask(this, callback)); |
| 2860 proxy_->LayoutAndPaintAsyncThen(base::Bind(&TestRunner::InvokeCallback, | 2859 proxy_->LayoutAndPaintAsyncThen(base::Bind(&TestRunner::InvokeCallback, |
| 2861 weak_factory_.GetWeakPtr(), | 2860 weak_factory_.GetWeakPtr(), |
| 2862 base::Passed(&task))); | 2861 base::Passed(&task))); |
| 2863 } | 2862 } |
| 2864 | 2863 |
| 2865 void TestRunner::GetManifestThen(v8::Local<v8::Function> callback) { | 2864 void TestRunner::GetManifestThen(v8::Local<v8::Function> callback) { |
| 2866 scoped_ptr<InvokeCallbackTask> task( | 2865 scoped_ptr<InvokeCallbackTask> task( |
| 2867 new InvokeCallbackTask(this, callback)); | 2866 new InvokeCallbackTask(this, callback)); |
| 2868 | 2867 |
| 2869 FetchManifest(web_view_, web_view_->mainFrame()->document().manifestURL(), | 2868 delegate_->FetchManifest( |
| 2870 base::Bind(&TestRunner::GetManifestCallback, | 2869 web_view_, web_view_->mainFrame()->document().manifestURL(), |
| 2871 weak_factory_.GetWeakPtr(), | 2870 base::Bind(&TestRunner::GetManifestCallback, weak_factory_.GetWeakPtr(), |
| 2872 base::Passed(&task))); | 2871 base::Passed(&task))); |
| 2873 } | 2872 } |
| 2874 | 2873 |
| 2875 void TestRunner::CapturePixelsAsyncThen(v8::Local<v8::Function> callback) { | 2874 void TestRunner::CapturePixelsAsyncThen(v8::Local<v8::Function> callback) { |
| 2876 scoped_ptr<InvokeCallbackTask> task( | 2875 scoped_ptr<InvokeCallbackTask> task( |
| 2877 new InvokeCallbackTask(this, callback)); | 2876 new InvokeCallbackTask(this, callback)); |
| 2878 proxy_->CapturePixelsAsync(base::Bind(&TestRunner::CapturePixelsCallback, | 2877 proxy_->CapturePixelsAsync(base::Bind(&TestRunner::CapturePixelsCallback, |
| 2879 weak_factory_.GetWeakPtr(), | 2878 weak_factory_.GetWeakPtr(), |
| 2880 base::Passed(&task))); | 2879 base::Passed(&task))); |
| 2881 } | 2880 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2992 } | 2991 } |
| 2993 | 2992 |
| 2994 void TestRunner::DidLosePointerLockInternal() { | 2993 void TestRunner::DidLosePointerLockInternal() { |
| 2995 bool was_locked = pointer_locked_; | 2994 bool was_locked = pointer_locked_; |
| 2996 pointer_locked_ = false; | 2995 pointer_locked_ = false; |
| 2997 if (was_locked) | 2996 if (was_locked) |
| 2998 web_view_->didLosePointerLock(); | 2997 web_view_->didLosePointerLock(); |
| 2999 } | 2998 } |
| 3000 | 2999 |
| 3001 } // namespace content | 3000 } // namespace content |
| OLD | NEW |