OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 8152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8163 EXPECT_EQ(200, layoutViewItem.logicalWidth().floor()); | 8163 EXPECT_EQ(200, layoutViewItem.logicalWidth().floor()); |
8164 EXPECT_EQ(400, layoutViewItem.logicalHeight().floor()); | 8164 EXPECT_EQ(400, layoutViewItem.logicalHeight().floor()); |
8165 EXPECT_FLOAT_EQ(0.5, webViewImpl->minimumPageScaleFactor()); | 8165 EXPECT_FLOAT_EQ(0.5, webViewImpl->minimumPageScaleFactor()); |
8166 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 8166 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
8167 } | 8167 } |
8168 | 8168 |
8169 namespace { | 8169 namespace { |
8170 | 8170 |
8171 class TestFullscreenWebLayerTreeView : public WebLayerTreeView { | 8171 class TestFullscreenWebLayerTreeView : public WebLayerTreeView { |
8172 public: | 8172 public: |
8173 void setHasTransparentBackground(bool value) override { | 8173 void setBackgroundColor(blink::WebColor color) override { |
8174 hasTransparentBackground = value; | 8174 hasTransparentBackground = SkColorGetA(color) < SK_AlphaOPAQUE; |
8175 } | 8175 } |
8176 bool hasTransparentBackground = false; | 8176 bool hasTransparentBackground = false; |
8177 }; | 8177 }; |
8178 | 8178 |
8179 class TestFullscreenWebViewClient : public FrameTestHelpers::TestWebViewClient { | 8179 class TestFullscreenWebViewClient : public FrameTestHelpers::TestWebViewClient { |
8180 public: | 8180 public: |
8181 WebLayerTreeView* initializeLayerTreeView() override { | 8181 WebLayerTreeView* initializeLayerTreeView() override { |
8182 return &testFullscreenLayerTreeView; | 8182 return &testFullscreenLayerTreeView; |
8183 } | 8183 } |
8184 TestFullscreenWebLayerTreeView testFullscreenLayerTreeView; | 8184 TestFullscreenWebLayerTreeView testFullscreenLayerTreeView; |
(...skipping 3314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11499 EXPECT_FALSE(testSelectAll("<textarea></textarea>")); | 11499 EXPECT_FALSE(testSelectAll("<textarea></textarea>")); |
11500 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>")); | 11500 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>")); |
11501 EXPECT_FALSE(testSelectAll("<input>")); | 11501 EXPECT_FALSE(testSelectAll("<input>")); |
11502 EXPECT_TRUE(testSelectAll("<input value='nonempty'>")); | 11502 EXPECT_TRUE(testSelectAll("<input value='nonempty'>")); |
11503 // TODO(amaralp): Empty contenteditable should not have select all enabled. | 11503 // TODO(amaralp): Empty contenteditable should not have select all enabled. |
11504 EXPECT_TRUE(testSelectAll("<div contenteditable></div>")); | 11504 EXPECT_TRUE(testSelectAll("<div contenteditable></div>")); |
11505 EXPECT_TRUE(testSelectAll("<div contenteditable>nonempty</div>")); | 11505 EXPECT_TRUE(testSelectAll("<div contenteditable>nonempty</div>")); |
11506 } | 11506 } |
11507 | 11507 |
11508 } // namespace blink | 11508 } // namespace blink |
OLD | NEW |