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

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

Issue 1414223005: Remove URLs from chrome.tabs.executeScript permission warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test case Created 5 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_tabs_apitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_tabs_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698