| Index: third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
|
| index 7bc30d33472ac58178a07ab75cddfefdf1e5b0bb..29c801008b2604edff731c538849a976337aae85 100644
|
| --- a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
|
| @@ -340,8 +340,9 @@ TEST_F(WebPluginContainerTest, Copy) {
|
| ->getElementById("translated-plugin")
|
| ->focus();
|
| EXPECT_TRUE(webView->mainFrame()->toWebLocalFrame()->executeCommand("Copy"));
|
| - EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(
|
| - WebClipboard::Buffer()));
|
| + EXPECT_EQ(
|
| + WebString("x"),
|
| + Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer()));
|
| }
|
|
|
| TEST_F(WebPluginContainerTest, CopyFromContextMenu) {
|
| @@ -364,13 +365,15 @@ TEST_F(WebPluginContainerTest, CopyFromContextMenu) {
|
| // Make sure the right-click + Copy works in common scenario.
|
| webView->handleInputEvent(WebCoalescedInputEvent(event));
|
| EXPECT_TRUE(webView->mainFrame()->toWebLocalFrame()->executeCommand("Copy"));
|
| - EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(
|
| - WebClipboard::Buffer()));
|
| + EXPECT_EQ(
|
| + WebString("x"),
|
| + Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer()));
|
|
|
| // Clear the clipboard buffer.
|
| Platform::current()->clipboard()->writePlainText(WebString(""));
|
| - EXPECT_EQ(WebString(""), Platform::current()->clipboard()->readPlainText(
|
| - WebClipboard::Buffer()));
|
| + EXPECT_EQ(
|
| + WebString(""),
|
| + Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer()));
|
|
|
| // Now, let's try a more complex scenario:
|
| // 1) open the context menu. This will focus the plugin.
|
| @@ -380,8 +383,9 @@ TEST_F(WebPluginContainerTest, CopyFromContextMenu) {
|
| // 3) Copy should still operate on the context node, even though the focus had
|
| // shifted.
|
| EXPECT_TRUE(webView->mainFrame()->toWebLocalFrame()->executeCommand("Copy"));
|
| - EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(
|
| - WebClipboard::Buffer()));
|
| + EXPECT_EQ(
|
| + WebString("x"),
|
| + Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer()));
|
| }
|
|
|
| // Verifies |Ctrl-C| and |Ctrl-Insert| keyboard events, results in copying to
|
| @@ -415,13 +419,15 @@ TEST_F(WebPluginContainerTest, CopyInsertKeyboardEventsTest) {
|
| KeyboardEvent* keyEventC = KeyboardEvent::create(webKeyboardEventC, 0);
|
| toWebPluginContainerImpl(pluginContainerOneElement.pluginContainer())
|
| ->handleEvent(keyEventC);
|
| - EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(
|
| - WebClipboard::Buffer()));
|
| + EXPECT_EQ(
|
| + WebString("x"),
|
| + Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer()));
|
|
|
| // Clearing |Clipboard::Buffer()|.
|
| Platform::current()->clipboard()->writePlainText(WebString(""));
|
| - EXPECT_EQ(WebString(""), Platform::current()->clipboard()->readPlainText(
|
| - WebClipboard::Buffer()));
|
| + EXPECT_EQ(
|
| + WebString(""),
|
| + Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer()));
|
|
|
| WebKeyboardEvent webKeyboardEventInsert(WebInputEvent::RawKeyDown,
|
| modifierKey,
|
| @@ -431,8 +437,9 @@ TEST_F(WebPluginContainerTest, CopyInsertKeyboardEventsTest) {
|
| KeyboardEvent::create(webKeyboardEventInsert, 0);
|
| toWebPluginContainerImpl(pluginContainerOneElement.pluginContainer())
|
| ->handleEvent(keyEventInsert);
|
| - EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(
|
| - WebClipboard::Buffer()));
|
| + EXPECT_EQ(
|
| + WebString("x"),
|
| + Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer()));
|
| }
|
|
|
| // A class to facilitate testing that events are correctly received by plugins.
|
|
|