Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: content/renderer/peripheral_content_heuristic_unittest.cc

Issue 2765633002: Plugin Power Saver Tiny: Treat completely obscured plugins as Tiny. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/peripheral_content_heuristic.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/renderer/peripheral_content_heuristic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698