| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | |
| 7 #include <string> | 6 #include <string> |
| 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
| 12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
| 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 EXPECT_TRUE(PluginLoaded(contents, element_id)); | 147 EXPECT_TRUE(PluginLoaded(contents, element_id)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 scoped_ptr<net::test_server::HttpResponse> RespondWithHTML( | 150 scoped_ptr<net::test_server::HttpResponse> RespondWithHTML( |
| 151 const std::string& html, | 151 const std::string& html, |
| 152 const net::test_server::HttpRequest& request) { | 152 const net::test_server::HttpRequest& request) { |
| 153 scoped_ptr<net::test_server::BasicHttpResponse> response( | 153 scoped_ptr<net::test_server::BasicHttpResponse> response( |
| 154 new net::test_server::BasicHttpResponse()); | 154 new net::test_server::BasicHttpResponse()); |
| 155 response->set_content_type("text/html"); | 155 response->set_content_type("text/html"); |
| 156 response->set_content(html); | 156 response->set_content(html); |
| 157 return response.Pass(); | 157 return std::move(response); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void VerifyVisualStateUpdated(const base::Closure& done_cb, | 160 void VerifyVisualStateUpdated(const base::Closure& done_cb, |
| 161 bool visual_state_updated) { | 161 bool visual_state_updated) { |
| 162 ASSERT_TRUE(visual_state_updated); | 162 ASSERT_TRUE(visual_state_updated); |
| 163 done_cb.Run(); | 163 done_cb.Run(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 bool SnapshotMatches(const base::FilePath& reference, const SkBitmap& bitmap) { | 166 bool SnapshotMatches(const base::FilePath& reference, const SkBitmap& bitmap) { |
| 167 if (bitmap.width() < kComparisonWidth || | 167 if (bitmap.width() < kComparisonWidth || |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 | 637 |
| 638 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { | 638 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { |
| 639 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) | 639 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) |
| 640 ->SetZoomLevel(4.0); | 640 ->SetZoomLevel(4.0); |
| 641 LoadHTML( | 641 LoadHTML( |
| 642 "<object id='plugin' data='http://otherorigin.com/fake.swf' " | 642 "<object id='plugin' data='http://otherorigin.com/fake.swf' " |
| 643 " type='application/x-ppapi-tests' width='400' height='200'>" | 643 " type='application/x-ppapi-tests' width='400' height='200'>" |
| 644 "</object>"); | 644 "</object>"); |
| 645 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); | 645 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); |
| 646 } | 646 } |
| OLD | NEW |