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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_test.cc

Issue 769593003: Move ZoomObserver, ZoomController and ZoomEventManager to components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete defines in build files. Created 6 years 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
OLDNEW
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
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 ui_zoom::ZoomController::FromWebContents(web_contents)->GetZoomLevel();
807 } 807 }
808 808
809 content::OpenURLParams GetOpenParams(const char* url) { 809 content::OpenURLParams GetOpenParams(const char* url) {
810 return content::OpenURLParams(GURL(url), 810 return content::OpenURLParams(GURL(url),
811 content::Referrer(), 811 content::Referrer(),
812 NEW_FOREGROUND_TAB, 812 NEW_FOREGROUND_TAB,
813 ui::PAGE_TRANSITION_LINK, 813 ui::PAGE_TRANSITION_LINK,
814 false); 814 false);
815 } 815 }
816 816
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 // Test chrome.tabs.setZoom(). 957 // Test chrome.tabs.setZoom().
958 error = RunSetZoomExpectError(tab_id, 3.14159); 958 error = RunSetZoomExpectError(tab_id, 3.14159);
959 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); 959 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl));
960 960
961 // chrome.tabs.setZoomSettings(). 961 // chrome.tabs.setZoomSettings().
962 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); 962 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab");
963 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); 963 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl));
964 } 964 }
965 965
966 } // namespace extensions 966 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698