| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "web/PluginPlaceholderImpl.h" | 6 #include "web/PluginPlaceholderImpl.h" |
| 7 | 7 |
| 8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/CSSValueKeywords.h" | 9 #include "core/CSSValueKeywords.h" |
| 10 #include "core/HTMLNames.h" | 10 #include "core/HTMLNames.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 using testing::Return; | 24 using testing::Return; |
| 25 | 25 |
| 26 namespace blink { | 26 namespace blink { |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 using HTMLNames::scriptTag; | 29 using HTMLNames::scriptTag; |
| 30 | 30 |
| 31 class MockWebPluginPlaceholder : public WebPluginPlaceholder { | 31 class MockWebPluginPlaceholder : public WebPluginPlaceholder { |
| 32 public: | 32 public: |
| 33 static PassOwnPtr<MockWebPluginPlaceholder> create() { return adoptPtr(new M
ockWebPluginPlaceholder); } | 33 static PassOwnPtr<MockWebPluginPlaceholder> create() { return adoptPtr(new M
ockWebPluginPlaceholder); } |
| 34 virtual ~MockWebPluginPlaceholder() { } | 34 ~MockWebPluginPlaceholder() override { } |
| 35 | 35 |
| 36 MOCK_CONST_METHOD0(message, WebString()); | 36 MOCK_CONST_METHOD0(message, WebString()); |
| 37 MOCK_CONST_METHOD0(isCloseable, bool()); | 37 MOCK_CONST_METHOD0(isCloseable, bool()); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 MockWebPluginPlaceholder() | 40 MockWebPluginPlaceholder() |
| 41 { | 41 { |
| 42 ON_CALL(*this, message()).WillByDefault(Return(WebString())); | 42 ON_CALL(*this, message()).WillByDefault(Return(WebString())); |
| 43 } | 43 } |
| 44 }; | 44 }; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 { | 119 { |
| 120 EXPECT_CALL(webPluginPlaceholder(), isCloseable()).WillOnce(Return(false)); | 120 EXPECT_CALL(webPluginPlaceholder(), isCloseable()).WillOnce(Return(false)); |
| 121 pluginPlaceholder().loadIntoContainer(documentFragment()); | 121 pluginPlaceholder().loadIntoContainer(documentFragment()); |
| 122 RefPtrWillBeRawPtr<Element> closeButton = documentFragment().getElementById(
"plugin-placeholder-close-button"); | 122 RefPtrWillBeRawPtr<Element> closeButton = documentFragment().getElementById(
"plugin-placeholder-close-button"); |
| 123 EXPECT_NE(nullptr, closeButton); | 123 EXPECT_NE(nullptr, closeButton); |
| 124 EXPECT_TRUE(isHiddenWithInlineStyle(closeButton.get())); | 124 EXPECT_TRUE(isHiddenWithInlineStyle(closeButton.get())); |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace | 127 } // namespace |
| 128 } // namespace blink | 128 } // namespace blink |
| OLD | NEW |