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 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 registry.didAddEventHandler(*div, EventHandlerRegistry::ScrollEvent); | 2488 registry.didAddEventHandler(*div, EventHandlerRegistry::ScrollEvent); |
2489 EXPECT_TRUE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent)); | 2489 EXPECT_TRUE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent)); |
2490 | 2490 |
2491 TrackExceptionState exceptionState; | 2491 TrackExceptionState exceptionState; |
2492 div->remove(exceptionState); | 2492 div->remove(exceptionState); |
2493 | 2493 |
2494 // For oilpan we have to force a GC to ensure the event handlers have been r
emoved when | 2494 // For oilpan we have to force a GC to ensure the event handlers have been r
emoved when |
2495 // checking below. We do a precise GC (collectAllGarbage does not scan the s
tack) | 2495 // checking below. We do a precise GC (collectAllGarbage does not scan the s
tack) |
2496 // to ensure the div element dies. This is also why the Document is in a Per
sistent | 2496 // to ensure the div element dies. This is also why the Document is in a Per
sistent |
2497 // since we want that to stay around. | 2497 // since we want that to stay around. |
2498 ThreadHeap::collectAllGarbage(); | 2498 Heap::collectAllGarbage(); |
2499 | 2499 |
2500 EXPECT_FALSE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent)); | 2500 EXPECT_FALSE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent)); |
2501 } | 2501 } |
2502 | 2502 |
2503 class NonUserInputTextUpdateWebViewClient : public FrameTestHelpers::TestWebView
Client { | 2503 class NonUserInputTextUpdateWebViewClient : public FrameTestHelpers::TestWebView
Client { |
2504 public: | 2504 public: |
2505 NonUserInputTextUpdateWebViewClient() : m_textIsUpdated(false) { } | 2505 NonUserInputTextUpdateWebViewClient() : m_textIsUpdated(false) { } |
2506 | 2506 |
2507 // WebWidgetClient methods | 2507 // WebWidgetClient methods |
2508 void didUpdateTextOfFocusedElementByNonUserInput() override | 2508 void didUpdateTextOfFocusedElementByNonUserInput() override |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3291 frame->setAutofillClient(&client); | 3291 frame->setAutofillClient(&client); |
3292 webView->setInitialFocus(false); | 3292 webView->setInitialFocus(false); |
3293 | 3293 |
3294 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel
lo").c_str()))); | 3294 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel
lo").c_str()))); |
3295 EXPECT_EQ(1, client.textChangesFromUserGesture()); | 3295 EXPECT_EQ(1, client.textChangesFromUserGesture()); |
3296 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); | 3296 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); |
3297 frame->setAutofillClient(0); | 3297 frame->setAutofillClient(0); |
3298 } | 3298 } |
3299 | 3299 |
3300 } // namespace blink | 3300 } // namespace blink |
OLD | NEW |