Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebHeap.cpp ('k') | tools/perf/measurements/oilpan_gc_times.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2442 registry.didAddEventHandler(*div, EventHandlerRegistry::ScrollEvent); 2442 registry.didAddEventHandler(*div, EventHandlerRegistry::ScrollEvent);
2443 EXPECT_TRUE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent)); 2443 EXPECT_TRUE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent));
2444 2444
2445 TrackExceptionState exceptionState; 2445 TrackExceptionState exceptionState;
2446 div->remove(exceptionState); 2446 div->remove(exceptionState);
2447 #if ENABLE(OILPAN) 2447 #if ENABLE(OILPAN)
2448 // For oilpan we have to force a GC to ensure the event handlers have been r emoved when 2448 // For oilpan we have to force a GC to ensure the event handlers have been r emoved when
2449 // checking below. We do a precise GC (collectAllGarbage does not scan the s tack) 2449 // checking below. We do a precise GC (collectAllGarbage does not scan the s tack)
2450 // to ensure the div element dies. This is also why the Document is in a Per sistent 2450 // to ensure the div element dies. This is also why the Document is in a Per sistent
2451 // since we want that to stay around. 2451 // since we want that to stay around.
2452 Heap::collectAllGarbage(); 2452 ThreadHeap::collectAllGarbage();
2453 #endif 2453 #endif
2454 EXPECT_FALSE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent)); 2454 EXPECT_FALSE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent));
2455 } 2455 }
2456 2456
2457 class NonUserInputTextUpdateWebViewClient : public FrameTestHelpers::TestWebView Client { 2457 class NonUserInputTextUpdateWebViewClient : public FrameTestHelpers::TestWebView Client {
2458 public: 2458 public:
2459 NonUserInputTextUpdateWebViewClient() : m_textIsUpdated(false) { } 2459 NonUserInputTextUpdateWebViewClient() : m_textIsUpdated(false) { }
2460 2460
2461 // WebWidgetClient methods 2461 // WebWidgetClient methods
2462 void didUpdateTextOfFocusedElementByNonUserInput() override 2462 void didUpdateTextOfFocusedElementByNonUserInput() override
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
3245 frame->setAutofillClient(&client); 3245 frame->setAutofillClient(&client);
3246 webView->setInitialFocus(false); 3246 webView->setInitialFocus(false);
3247 3247
3248 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str()))); 3248 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str())));
3249 EXPECT_EQ(1, client.textChangesFromUserGesture()); 3249 EXPECT_EQ(1, client.textChangesFromUserGesture());
3250 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); 3250 EXPECT_FALSE(UserGestureIndicator::processingUserGesture());
3251 frame->setAutofillClient(0); 3251 frame->setAutofillClient(0);
3252 } 3252 }
3253 3253
3254 } // namespace blink 3254 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebHeap.cpp ('k') | tools/perf/measurements/oilpan_gc_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698