| Index: Source/web/tests/WebFrameTest.cpp
|
| diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
|
| index 786e119f528bee9b74d0cd8ec830c0158d3b9c08..830d9928c6c710aa8d795e701e09fd5bd8c1c5d3 100644
|
| --- a/Source/web/tests/WebFrameTest.cpp
|
| +++ b/Source/web/tests/WebFrameTest.cpp
|
| @@ -5544,4 +5544,43 @@ TEST_F(WebFrameTest, NodeImageTestCSS3DTransform)
|
| EXPECT_EQ(0, memcmp(bitmap.getPixels(), dragBitmap.getPixels(), bitmap.getSize()));
|
| }
|
|
|
| +class BrandColorTestWebFrameClient : public FrameTestHelpers::TestWebFrameClient {
|
| +public:
|
| + BrandColorTestWebFrameClient()
|
| + : m_didNotify(false)
|
| + , m_brandColor(0)
|
| + {
|
| + }
|
| +
|
| + bool didNotify() const
|
| + {
|
| + return m_didNotify;
|
| + }
|
| +
|
| + WebColor brandColor() const
|
| + {
|
| + return m_brandColor;
|
| + }
|
| +
|
| +private:
|
| + virtual void didChangeBrandColor(WebLocalFrame* webLocalFrame)
|
| + {
|
| + m_didNotify = true;
|
| + m_brandColor = webLocalFrame->document().brandColor();
|
| + }
|
| +
|
| + bool m_didNotify;
|
| + WebColor m_brandColor;
|
| +};
|
| +
|
| +TEST_F(WebFrameTest, BrandColor)
|
| +{
|
| + registerMockedHttpURLLoad("brand_color_test.html");
|
| + FrameTestHelpers::WebViewHelper webViewHelper;
|
| + BrandColorTestWebFrameClient client;
|
| + webViewHelper.initializeAndLoad(m_baseURL + "brand_color_test.html", false, &client);
|
| + EXPECT_TRUE(client.didNotify());
|
| + EXPECT_EQ(0xff0000ff, client.brandColor());
|
| +}
|
| +
|
| } // namespace
|
|
|