| 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 "content/renderer/peripheral_content_heuristic.h" | 5 #include "content/renderer/peripheral_content_heuristic.h" |
| 6 | 6 |
| 7 #include "base/test/scoped_feature_list.h" | 7 #include "base/test/scoped_feature_list.h" |
| 8 #include "content/public/common/content_features.h" | 8 #include "content/public/common/content_features.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 std::set<url::Origin>(), url::Origin(GURL(kSameOrigin)), | 92 std::set<url::Origin>(), url::Origin(GURL(kSameOrigin)), |
| 93 url::Origin(GURL(kSameOrigin)), gfx::Size())); | 93 url::Origin(GURL(kSameOrigin)), gfx::Size())); |
| 94 | 94 |
| 95 std::set<url::Origin> whitelist; | 95 std::set<url::Origin> whitelist; |
| 96 whitelist.insert(url::Origin(GURL(kOtherOrigin))); | 96 whitelist.insert(url::Origin(GURL(kOtherOrigin))); |
| 97 EXPECT_EQ(RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED, | 97 EXPECT_EQ(RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED, |
| 98 PeripheralContentHeuristic::GetPeripheralStatus( | 98 PeripheralContentHeuristic::GetPeripheralStatus( |
| 99 whitelist, url::Origin(GURL(kSameOrigin)), | 99 whitelist, url::Origin(GURL(kSameOrigin)), |
| 100 url::Origin(GURL(kOtherOrigin)), gfx::Size())); | 100 url::Origin(GURL(kOtherOrigin)), gfx::Size())); |
| 101 | 101 |
| 102 EXPECT_EQ(RenderFrame::CONTENT_STATUS_UNKNOWN_SIZE, | 102 // Undefined size plugins are now marked as Tiny. |
| 103 EXPECT_EQ(RenderFrame::CONTENT_STATUS_TINY, |
| 103 PeripheralContentHeuristic::GetPeripheralStatus( | 104 PeripheralContentHeuristic::GetPeripheralStatus( |
| 104 std::set<url::Origin>(), url::Origin(GURL(kSameOrigin)), | 105 std::set<url::Origin>(), url::Origin(GURL(kSameOrigin)), |
| 105 url::Origin(GURL(kOtherOrigin)), gfx::Size())); | 106 url::Origin(GURL(kOtherOrigin)), gfx::Size())); |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace content | 109 } // namespace content |
| OLD | NEW |