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

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

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), WebString::fromUTF8("plugin_container.html")); 324 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), WebString::fromUTF8("plugin_container.html"));
325 TestPluginWebFrameClient pluginWebFrameClient; // Must outlive webViewHelper . 325 TestPluginWebFrameClient pluginWebFrameClient; // Must outlive webViewHelper .
326 FrameTestHelpers::WebViewHelper webViewHelper; 326 FrameTestHelpers::WebViewHelper webViewHelper;
327 WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_conta iner.html", true, &pluginWebFrameClient); 327 WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_conta iner.html", true, &pluginWebFrameClient);
328 DCHECK(webView); 328 DCHECK(webView);
329 webView->settings()->setPluginsEnabled(true); 329 webView->settings()->setPluginsEnabled(true);
330 webView->resize(WebSize(300, 300)); 330 webView->resize(WebSize(300, 300));
331 webView->updateAllLifecyclePhases(); 331 webView->updateAllLifecyclePhases();
332 runPendingTasks(); 332 runPendingTasks();
333 333
334 auto event = FrameTestHelpers::createMouseEvent(WebMouseEvent::MouseDown, We bMouseEvent::ButtonRight, WebPoint(30, 30), 0); 334 auto event = FrameTestHelpers::createMouseEvent(WebMouseEvent::MouseDown, We bMouseEvent::Button::Right, WebPoint(30, 30), 0);
335 event.clickCount = 1; 335 event.clickCount = 1;
336 336
337 // Make sure the right-click + Copy works in common scenario. 337 // Make sure the right-click + Copy works in common scenario.
338 webView->handleInputEvent(event); 338 webView->handleInputEvent(event);
339 EXPECT_TRUE(webView->mainFrame()->toWebLocalFrame()->executeCommand("Copy")) ; 339 EXPECT_TRUE(webView->mainFrame()->toWebLocalFrame()->executeCommand("Copy")) ;
340 EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(We bClipboard::Buffer())); 340 EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(We bClipboard::Buffer()));
341 341
342 // Clear the clipboard buffer. 342 // Clear the clipboard buffer.
343 Platform::current()->clipboard()->writePlainText(WebString("")); 343 Platform::current()->clipboard()->writePlainText(WebString(""));
344 EXPECT_EQ(WebString(""), Platform::current()->clipboard()->readPlainText(Web Clipboard::Buffer())); 344 EXPECT_EQ(WebString(""), Platform::current()->clipboard()->readPlainText(Web Clipboard::Buffer()));
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 runPendingTasks(); 683 runPendingTasks();
684 684
685 WebElement pluginContainerOneElement = webView->mainFrame()->document().getE lementById(WebString::fromUTF8("translated-plugin")); 685 WebElement pluginContainerOneElement = webView->mainFrame()->document().getE lementById(WebString::fromUTF8("translated-plugin"));
686 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true); 686 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true);
687 687
688 runPendingTasks(); 688 runPendingTasks();
689 EXPECT_TRUE(webView->page()->frameHost().eventHandlerRegistry().hasEventHand lers(EventHandlerRegistry::WheelEventBlocking)); 689 EXPECT_TRUE(webView->page()->frameHost().eventHandlerRegistry().hasEventHand lers(EventHandlerRegistry::WheelEventBlocking));
690 } 690 }
691 691
692 } // namespace blink 692 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698