| 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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 | 1305 |
| 1306 scoped_refptr<TabsExecuteScriptFunction> function = | 1306 scoped_refptr<TabsExecuteScriptFunction> function = |
| 1307 new TabsExecuteScriptFunction(); | 1307 new TabsExecuteScriptFunction(); |
| 1308 function->set_extension(extension.get()); | 1308 function->set_extension(extension.get()); |
| 1309 | 1309 |
| 1310 EXPECT_TRUE(base::MatchPattern( | 1310 EXPECT_TRUE(base::MatchPattern( |
| 1311 utils::RunFunctionAndReturnError( | 1311 utils::RunFunctionAndReturnError( |
| 1312 function.get(), base::StringPrintf("[%u, {\"code\": \"true\"}]", | 1312 function.get(), base::StringPrintf("[%u, {\"code\": \"true\"}]", |
| 1313 api::windows::WINDOW_ID_CURRENT), | 1313 api::windows::WINDOW_ID_CURRENT), |
| 1314 DevToolsWindowTesting::Get(devtools)->browser()), | 1314 DevToolsWindowTesting::Get(devtools)->browser()), |
| 1315 manifest_errors::kCannotAccessPage)); | 1315 manifest_errors::kCannotAccessPageWithUrl)); |
| 1316 | 1316 |
| 1317 DevToolsWindowTesting::CloseDevToolsWindowSync(devtools); | 1317 DevToolsWindowTesting::CloseDevToolsWindowSync(devtools); |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 // Tester class for the tabs.zoom* api functions. | 1320 // Tester class for the tabs.zoom* api functions. |
| 1321 class ExtensionTabsZoomTest : public ExtensionTabsTest { | 1321 class ExtensionTabsZoomTest : public ExtensionTabsTest { |
| 1322 public: | 1322 public: |
| 1323 void SetUpOnMainThread() override; | 1323 void SetUpOnMainThread() override; |
| 1324 | 1324 |
| 1325 // Runs chrome.tabs.setZoom(). | 1325 // Runs chrome.tabs.setZoom(). |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 EXPECT_TRUE( | 1750 EXPECT_TRUE( |
| 1751 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); | 1751 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); |
| 1752 | 1752 |
| 1753 // chrome.tabs.setZoomSettings(). | 1753 // chrome.tabs.setZoomSettings(). |
| 1754 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); | 1754 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); |
| 1755 EXPECT_TRUE( | 1755 EXPECT_TRUE( |
| 1756 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); | 1756 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); |
| 1757 } | 1757 } |
| 1758 | 1758 |
| 1759 } // namespace extensions | 1759 } // namespace extensions |
| OLD | NEW |