OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 class MockAutofillClient : public WebAutofillClient { | 1080 class MockAutofillClient : public WebAutofillClient { |
1081 public: | 1081 public: |
1082 MockAutofillClient() | 1082 MockAutofillClient() |
1083 : m_ignoreTextChanges(false) | 1083 : m_ignoreTextChanges(false) |
1084 , m_textChangesWhileIgnored(0) | 1084 , m_textChangesWhileIgnored(0) |
1085 , m_textChangesWhileNotIgnored(0) { } | 1085 , m_textChangesWhileNotIgnored(0) { } |
1086 | 1086 |
1087 virtual ~MockAutofillClient() { } | 1087 virtual ~MockAutofillClient() { } |
1088 | 1088 |
1089 virtual void setIgnoreTextChanges(bool ignore) OVERRIDE { m_ignoreTextChange
s = ignore; } | 1089 virtual void setIgnoreTextChanges(bool ignore) OVERRIDE { m_ignoreTextChange
s = ignore; } |
1090 virtual void textFieldDidChange(const WebInputElement&) OVERRIDE | 1090 virtual void textFieldDidChange(const WebFormControlElement&) OVERRIDE |
1091 { | 1091 { |
1092 if (m_ignoreTextChanges) | 1092 if (m_ignoreTextChanges) |
1093 ++m_textChangesWhileIgnored; | 1093 ++m_textChangesWhileIgnored; |
1094 else | 1094 else |
1095 ++m_textChangesWhileNotIgnored; | 1095 ++m_textChangesWhileNotIgnored; |
1096 } | 1096 } |
1097 | 1097 |
1098 void clearChangeCounts() | 1098 void clearChangeCounts() |
1099 { | 1099 { |
1100 m_textChangesWhileIgnored = 0; | 1100 m_textChangesWhileIgnored = 0; |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1615 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1616 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1616 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1617 | 1617 |
1618 // Now removing the handler in the parent document results in a no-handlers
call. | 1618 // Now removing the handler in the parent document results in a no-handlers
call. |
1619 document->didRemoveTouchEventHandler(childFrame); | 1619 document->didRemoveTouchEventHandler(childFrame); |
1620 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1620 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1621 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1621 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1622 } | 1622 } |
1623 | 1623 |
1624 } // namespace | 1624 } // namespace |
OLD | NEW |