| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 5 |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 browser(), | 796 browser(), |
| 797 url, | 797 url, |
| 798 NEW_FOREGROUND_TAB, | 798 NEW_FOREGROUND_TAB, |
| 799 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 799 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
| 800 return browser()->tab_strip_model()->GetActiveWebContents(); | 800 return browser()->tab_strip_model()->GetActiveWebContents(); |
| 801 } | 801 } |
| 802 | 802 |
| 803 namespace { | 803 namespace { |
| 804 | 804 |
| 805 double GetZoomLevel(const content::WebContents* web_contents) { | 805 double GetZoomLevel(const content::WebContents* web_contents) { |
| 806 return ZoomController::FromWebContents(web_contents)->GetZoomLevel(); | 806 return components::ZoomController::FromWebContents(web_contents) |
| 807 ->GetZoomLevel(); |
| 807 } | 808 } |
| 808 | 809 |
| 809 content::OpenURLParams GetOpenParams(const char* url) { | 810 content::OpenURLParams GetOpenParams(const char* url) { |
| 810 return content::OpenURLParams(GURL(url), | 811 return content::OpenURLParams(GURL(url), |
| 811 content::Referrer(), | 812 content::Referrer(), |
| 812 NEW_FOREGROUND_TAB, | 813 NEW_FOREGROUND_TAB, |
| 813 ui::PAGE_TRANSITION_LINK, | 814 ui::PAGE_TRANSITION_LINK, |
| 814 false); | 815 false); |
| 815 } | 816 } |
| 816 | 817 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 // Test chrome.tabs.setZoom(). | 958 // Test chrome.tabs.setZoom(). |
| 958 error = RunSetZoomExpectError(tab_id, 3.14159); | 959 error = RunSetZoomExpectError(tab_id, 3.14159); |
| 959 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); | 960 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); |
| 960 | 961 |
| 961 // chrome.tabs.setZoomSettings(). | 962 // chrome.tabs.setZoomSettings(). |
| 962 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); | 963 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); |
| 963 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); | 964 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); |
| 964 } | 965 } |
| 965 | 966 |
| 966 } // namespace extensions | 967 } // namespace extensions |
| OLD | NEW |