| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 EXPECT_FALSE(token.hasGestures()); | 42 EXPECT_FALSE(token.hasGestures()); |
| 43 UserGestureIndicator::clearProcessedUserGestureSinceLoad(); | 43 UserGestureIndicator::clearProcessedUserGestureSinceLoad(); |
| 44 EXPECT_FALSE(UserGestureIndicator::processedUserGestureSinceLoad()); | 44 EXPECT_FALSE(UserGestureIndicator::processedUserGestureSinceLoad()); |
| 45 | 45 |
| 46 { | 46 { |
| 47 WebScopedUserGesture indicator(token); | 47 WebScopedUserGesture indicator(token); |
| 48 EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture()); | 48 EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture()); |
| 49 } | 49 } |
| 50 | 50 |
| 51 { | 51 { |
| 52 UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture); | 52 UserGestureIndicator indicator( |
| 53 UserGestureToken::create(UserGestureToken::NewGesture)); |
| 53 EXPECT_TRUE(WebUserGestureIndicator::isProcessingUserGesture()); | 54 EXPECT_TRUE(WebUserGestureIndicator::isProcessingUserGesture()); |
| 54 token = WebUserGestureIndicator::currentUserGestureToken(); | 55 token = WebUserGestureIndicator::currentUserGestureToken(); |
| 55 EXPECT_TRUE(UserGestureIndicator::processedUserGestureSinceLoad()); | 56 EXPECT_TRUE(UserGestureIndicator::processedUserGestureSinceLoad()); |
| 56 } | 57 } |
| 57 | 58 |
| 58 EXPECT_TRUE(token.hasGestures()); | 59 EXPECT_TRUE(token.hasGestures()); |
| 59 EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture()); | 60 EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture()); |
| 60 | 61 |
| 61 { | 62 { |
| 62 WebScopedUserGesture indicator(token); | 63 WebScopedUserGesture indicator(token); |
| 63 EXPECT_TRUE(WebUserGestureIndicator::isProcessingUserGesture()); | 64 EXPECT_TRUE(WebUserGestureIndicator::isProcessingUserGesture()); |
| 64 WebUserGestureIndicator::consumeUserGesture(); | 65 WebUserGestureIndicator::consumeUserGesture(); |
| 65 EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture()); | 66 EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture()); |
| 66 } | 67 } |
| 67 | 68 |
| 68 EXPECT_FALSE(token.hasGestures()); | 69 EXPECT_FALSE(token.hasGestures()); |
| 69 | 70 |
| 70 { | 71 { |
| 71 WebScopedUserGesture indicator(token); | 72 WebScopedUserGesture indicator(token); |
| 72 EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture()); | 73 EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture()); |
| 73 } | 74 } |
| 74 | 75 |
| 75 EXPECT_TRUE(UserGestureIndicator::processedUserGestureSinceLoad()); | 76 EXPECT_TRUE(UserGestureIndicator::processedUserGestureSinceLoad()); |
| 76 } | 77 } |
| 77 | 78 |
| 78 } // namespace blink | 79 } // namespace blink |
| OLD | NEW |