Commit da5bfb3e authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Running |declarativeWebRequest| API tests in a simulated Beta channel.

Bug: 1057599
Change-Id: I31661c23763cb9861ec883b203a022c9e2d324da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2085836Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747086}
parent b623d83d
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "components/url_formatter/url_formatter.h" #include "components/url_formatter/url_formatter.h"
#include "components/variations/active_field_trials.h" #include "components/variations/active_field_trials.h"
#include "components/variations/hashing.h" #include "components/variations/hashing.h"
#include "components/version_info/channel.h"
#include "content/public/browser/download_manager_delegate.h" #include "content/public/browser/download_manager_delegate.h"
#include "content/public/browser/navigation_entry.h" #include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_handle.h"
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
#include "content/public/test/navigation_handle_observer.h" #include "content/public/test/navigation_handle_observer.h"
#include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_navigation_observer.h"
#include "content/public/test/url_loader_interceptor.h" #include "content/public/test/url_loader_interceptor.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/test/extension_test_message_listener.h" #include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/test_extension_dir.h" #include "extensions/test/test_extension_dir.h"
#include "google_apis/gaia/gaia_switches.h" #include "google_apis/gaia/gaia_switches.h"
...@@ -723,6 +725,9 @@ IN_PROC_BROWSER_TEST_F( ...@@ -723,6 +725,9 @@ IN_PROC_BROWSER_TEST_F(
extensions::TestExtensionDir ext_dir; extensions::TestExtensionDir ext_dir;
ext_dir.WriteManifest(kManifest); ext_dir.WriteManifest(kManifest);
ext_dir.WriteFile(FILE_PATH_LITERAL("background.js"), kRulesScript); ext_dir.WriteFile(FILE_PATH_LITERAL("background.js"), kRulesScript);
// |declarativeWebRequest| API is not available on the STABLE channel yet
// (see https://crbug.com/1057599).
extensions::ScopedCurrentChannel release_channel(version_info::Channel::BETA);
extensions::ChromeTestExtensionLoader extension_loader(browser()->profile()); extensions::ChromeTestExtensionLoader extension_loader(browser()->profile());
scoped_refptr<const extensions::Extension> extension = scoped_refptr<const extensions::Extension> extension =
extension_loader.LoadExtension(ext_dir.UnpackedPath()); extension_loader.LoadExtension(ext_dir.UnpackedPath());
...@@ -867,6 +872,9 @@ IN_PROC_BROWSER_TEST_F( ...@@ -867,6 +872,9 @@ IN_PROC_BROWSER_TEST_F(
ext_dir.WriteFile( ext_dir.WriteFile(
FILE_PATH_LITERAL("background.js"), FILE_PATH_LITERAL("background.js"),
content::JsReplace(kRulesScriptTemplate, kRedirectTargetUrl)); content::JsReplace(kRulesScriptTemplate, kRedirectTargetUrl));
// |declarativeWebRequest| API is not available on the STABLE channel yet
// (see https://crbug.com/1057599).
extensions::ScopedCurrentChannel release_channel(version_info::Channel::BETA);
extensions::ChromeTestExtensionLoader extension_loader(browser()->profile()); extensions::ChromeTestExtensionLoader extension_loader(browser()->profile());
scoped_refptr<const extensions::Extension> extension = scoped_refptr<const extensions::Extension> extension =
extension_loader.LoadExtension(ext_dir.UnpackedPath()); extension_loader.LoadExtension(ext_dir.UnpackedPath());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment