diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/testing/testing_platform_support.h')
-rw-r--r-- | chromium/third_party/blink/renderer/platform/testing/testing_platform_support.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/chromium/third_party/blink/renderer/platform/testing/testing_platform_support.h b/chromium/third_party/blink/renderer/platform/testing/testing_platform_support.h index debac8d0477..cf6ed4f932b 100644 --- a/chromium/third_party/blink/renderer/platform/testing/testing_platform_support.h +++ b/chromium/third_party/blink/renderer/platform/testing/testing_platform_support.h @@ -36,7 +36,6 @@ #include "base/auto_reset.h" #include "base/callback.h" -#include "base/macros.h" #include "base/memory/scoped_refptr.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/platform/platform_export.h" @@ -56,16 +55,15 @@ namespace blink { class TestingPlatformSupport : public Platform { public: TestingPlatformSupport(); + TestingPlatformSupport(const TestingPlatformSupport&) = delete; + TestingPlatformSupport& operator=(const TestingPlatformSupport&) = delete; ~TestingPlatformSupport() override; // Platform: WebString DefaultLocale() override; - std::unique_ptr<WebCodeCacheLoader> CreateCodeCacheLoader() override { - return std::make_unique<CodeCacheLoaderMock>(); - } WebData GetDataResource(int resource_id, - ui::ScaleFactor scale_factor) override; + ui::ResourceScaleFactor scale_factor) override; WebData UncompressDataResource(int resource_id) override; ThreadSafeBrowserInterfaceBrokerProxy* GetBrowserInterfaceBroker() override; bool IsThreadedAnimationEnabled() override; @@ -74,7 +72,7 @@ class TestingPlatformSupport : public Platform { virtual void RunUntilIdle(); void SetThreadedAnimationEnabled(bool enabled); - void SetUseZoomForDSF(bool enabeld); + void SetUseZoomForDSF(bool enabled); // Overrides the handling of GetInterface on the platform's associated // interface provider. @@ -98,9 +96,7 @@ class TestingPlatformSupport : public Platform { private: bool is_threaded_animation_enabled_ = false; - bool is_zoom_for_dsf_enabled_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestingPlatformSupport); + bool is_zoom_for_dsf_enabled_ = true; }; // ScopedTestingPlatformSupport<MyTestingPlatformSupport> can be used to @@ -128,8 +124,6 @@ class TestingPlatformSupport : public Platform { // } template <class T, typename... Args> class ScopedTestingPlatformSupport final { - DISALLOW_COPY_AND_ASSIGN(ScopedTestingPlatformSupport); - public: explicit ScopedTestingPlatformSupport(Args&&... args) { testing_platform_support_ = @@ -138,6 +132,9 @@ class ScopedTestingPlatformSupport final { DCHECK(original_platform_); Platform::SetCurrentPlatformForTesting(testing_platform_support_.get()); } + ScopedTestingPlatformSupport(const ScopedTestingPlatformSupport&) = delete; + ScopedTestingPlatformSupport& operator=(const ScopedTestingPlatformSupport&) = + delete; ~ScopedTestingPlatformSupport() { DCHECK_EQ(testing_platform_support_.get(), Platform::Current()); testing_platform_support_.reset(); @@ -158,10 +155,12 @@ class ScopedTestingPlatformSupport final { }; class ScopedUnittestsEnvironmentSetup final { - DISALLOW_COPY_AND_ASSIGN(ScopedUnittestsEnvironmentSetup); - public: ScopedUnittestsEnvironmentSetup(int argc, char** argv); + ScopedUnittestsEnvironmentSetup(const ScopedUnittestsEnvironmentSetup&) = + delete; + ScopedUnittestsEnvironmentSetup& operator=( + const ScopedUnittestsEnvironmentSetup&) = delete; ~ScopedUnittestsEnvironmentSetup(); private: |