| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "platform/ScopedOrientationChangeIndicator.h" |
| 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 |
| 9 namespace blink { |
| 10 |
| 11 TEST(ScopedOrientationChangeIndicatorTest, InitialState) |
| 12 { |
| 13 EXPECT_FALSE(ScopedOrientationChangeIndicator::processingOrientationChange()
); |
| 14 } |
| 15 |
| 16 TEST(ScopedOrientationChangeIndicatorTest, ConstructOneIndicatorWithGesture) |
| 17 { |
| 18 ScopedOrientationChangeIndicator indicator; |
| 19 |
| 20 EXPECT_TRUE(ScopedOrientationChangeIndicator::processingOrientationChange())
; |
| 21 } |
| 22 |
| 23 TEST(ScopedOrientationChangeIndicatorTest, MultipleIndicatorInTheSameScope) |
| 24 { |
| 25 ScopedOrientationChangeIndicator indicator1; |
| 26 |
| 27 EXPECT_TRUE(ScopedOrientationChangeIndicator::processingOrientationChange())
; |
| 28 |
| 29 ScopedOrientationChangeIndicator indicator2; |
| 30 |
| 31 EXPECT_TRUE(ScopedOrientationChangeIndicator::processingOrientationChange())
; |
| 32 } |
| 33 |
| 34 TEST(ScopedOrientationChangeIndicatorTest, DestructResetsStateUsingGesture) |
| 35 { |
| 36 { |
| 37 ScopedOrientationChangeIndicator indicator; |
| 38 } |
| 39 |
| 40 EXPECT_FALSE(ScopedOrientationChangeIndicator::processingOrientationChange()
); |
| 41 } |
| 42 |
| 43 TEST(ScopedOrientationChangeIndicatorTest, DestructResetsStateUsingNoGesture) |
| 44 { |
| 45 ScopedOrientationChangeIndicator indicator; |
| 46 { |
| 47 ScopedOrientationChangeIndicator indicator; |
| 48 } |
| 49 |
| 50 EXPECT_TRUE(ScopedOrientationChangeIndicator::processingOrientationChange())
; |
| 51 } |
| 52 |
| 53 } // namespace blink |
| OLD | NEW |