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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 EXPECT_EQ(window_id, duplicate_tab_window_id); | 592 EXPECT_EQ(window_id, duplicate_tab_window_id); |
593 EXPECT_EQ(tab_index + 1, duplicate_tab_index); | 593 EXPECT_EQ(tab_index + 1, duplicate_tab_index); |
594 // The test empty extension has no permissions, therefore |duplicate_result| | 594 // The test empty extension has no permissions, therefore |duplicate_result| |
595 // should not contain url, title, and faviconUrl in the function result. | 595 // should not contain url, title, and faviconUrl in the function result. |
596 EXPECT_FALSE(utils::HasPrivacySensitiveFields(duplicate_result.get())); | 596 EXPECT_FALSE(utils::HasPrivacySensitiveFields(duplicate_result.get())); |
597 } | 597 } |
598 | 598 |
599 // Tester class for the tabs.zoom* api functions. | 599 // Tester class for the tabs.zoom* api functions. |
600 class ExtensionTabsZoomTest : public ExtensionTabsTest { | 600 class ExtensionTabsZoomTest : public ExtensionTabsTest { |
601 public: | 601 public: |
602 virtual void SetUpOnMainThread() OVERRIDE; | 602 virtual void SetUpOnMainThread() override; |
603 | 603 |
604 // Runs chrome.tabs.setZoom(). | 604 // Runs chrome.tabs.setZoom(). |
605 bool RunSetZoom(int tab_id, double zoom_factor); | 605 bool RunSetZoom(int tab_id, double zoom_factor); |
606 | 606 |
607 // Runs chrome.tabs.getZoom(). | 607 // Runs chrome.tabs.getZoom(). |
608 testing::AssertionResult RunGetZoom(int tab_id, double* zoom_factor); | 608 testing::AssertionResult RunGetZoom(int tab_id, double* zoom_factor); |
609 | 609 |
610 // Runs chrome.tabs.setZoomSettings(). | 610 // Runs chrome.tabs.setZoomSettings(). |
611 bool RunSetZoomSettings(int tab_id, const char* mode, const char* scope); | 611 bool RunSetZoomSettings(int tab_id, const char* mode, const char* scope); |
612 | 612 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 // Test chrome.tabs.setZoom(). | 915 // Test chrome.tabs.setZoom(). |
916 error = RunSetZoomExpectError(tab_id, 3.14159); | 916 error = RunSetZoomExpectError(tab_id, 3.14159); |
917 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); | 917 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); |
918 | 918 |
919 // chrome.tabs.setZoomSettings(). | 919 // chrome.tabs.setZoomSettings(). |
920 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); | 920 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); |
921 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); | 921 EXPECT_TRUE(MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); |
922 } | 922 } |
923 | 923 |
924 } // namespace extensions | 924 } // namespace extensions |
OLD | NEW |