| 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 "components/test_runner/test_runner.h" | 5 #include "components/test_runner/test_runner.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "components/test_runner/app_banner_client.h" | |
| 18 #include "components/test_runner/layout_and_paint_async_then.h" | 17 #include "components/test_runner/layout_and_paint_async_then.h" |
| 19 #include "components/test_runner/layout_dump.h" | 18 #include "components/test_runner/layout_dump.h" |
| 20 #include "components/test_runner/mock_content_settings_client.h" | 19 #include "components/test_runner/mock_content_settings_client.h" |
| 21 #include "components/test_runner/mock_credential_manager_client.h" | 20 #include "components/test_runner/mock_credential_manager_client.h" |
| 22 #include "components/test_runner/mock_screen_orientation_client.h" | 21 #include "components/test_runner/mock_screen_orientation_client.h" |
| 23 #include "components/test_runner/mock_web_document_subresource_filter.h" | 22 #include "components/test_runner/mock_web_document_subresource_filter.h" |
| 24 #include "components/test_runner/mock_web_speech_recognizer.h" | 23 #include "components/test_runner/mock_web_speech_recognizer.h" |
| 25 #include "components/test_runner/mock_web_user_media_client.h" | 24 #include "components/test_runner/mock_web_user_media_client.h" |
| 26 #include "components/test_runner/pixel_dump.h" | 25 #include "components/test_runner/pixel_dump.h" |
| 27 #include "components/test_runner/spell_check_client.h" | 26 #include "components/test_runner/spell_check_client.h" |
| (...skipping 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2665 void TestRunner::SetPermission(const std::string& name, | 2664 void TestRunner::SetPermission(const std::string& name, |
| 2666 const std::string& value, | 2665 const std::string& value, |
| 2667 const GURL& origin, | 2666 const GURL& origin, |
| 2668 const GURL& embedding_origin) { | 2667 const GURL& embedding_origin) { |
| 2669 delegate_->SetPermission(name, value, origin, embedding_origin); | 2668 delegate_->SetPermission(name, value, origin, embedding_origin); |
| 2670 } | 2669 } |
| 2671 | 2670 |
| 2672 void TestRunner::ResolveBeforeInstallPromptPromise( | 2671 void TestRunner::ResolveBeforeInstallPromptPromise( |
| 2673 int request_id, | 2672 int request_id, |
| 2674 const std::string& platform) { | 2673 const std::string& platform) { |
| 2675 if (!test_interfaces_->GetAppBannerClient()) | 2674 delegate_->ResolveBeforeInstallPromptPromise(request_id, platform); |
| 2676 return; | |
| 2677 test_interfaces_->GetAppBannerClient()->ResolvePromise(request_id, platform); | |
| 2678 } | 2675 } |
| 2679 | 2676 |
| 2680 void TestRunner::SetPOSIXLocale(const std::string& locale) { | 2677 void TestRunner::SetPOSIXLocale(const std::string& locale) { |
| 2681 delegate_->SetLocale(locale); | 2678 delegate_->SetLocale(locale); |
| 2682 } | 2679 } |
| 2683 | 2680 |
| 2684 void TestRunner::SetMIDIAccessorResult(bool result) { | 2681 void TestRunner::SetMIDIAccessorResult(bool result) { |
| 2685 midi_accessor_result_ = result; | 2682 midi_accessor_result_ = result; |
| 2686 } | 2683 } |
| 2687 | 2684 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2770 | 2767 |
| 2771 void TestRunner::NotifyDone() { | 2768 void TestRunner::NotifyDone() { |
| 2772 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() && | 2769 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() && |
| 2773 !will_navigate_ && work_queue_.is_empty()) | 2770 !will_navigate_ && work_queue_.is_empty()) |
| 2774 delegate_->TestFinished(); | 2771 delegate_->TestFinished(); |
| 2775 layout_test_runtime_flags_.set_wait_until_done(false); | 2772 layout_test_runtime_flags_.set_wait_until_done(false); |
| 2776 OnLayoutTestRuntimeFlagsChanged(); | 2773 OnLayoutTestRuntimeFlagsChanged(); |
| 2777 } | 2774 } |
| 2778 | 2775 |
| 2779 } // namespace test_runner | 2776 } // namespace test_runner |
| OLD | NEW |