Skip to content

Commit 5a6504a

Browse files
committed
Move NetworkInterceptor to main devtools package
1 parent ece979a commit 5a6504a

File tree

8 files changed

+10
-43
lines changed

8 files changed

+10
-43
lines changed

java/CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ v4.0.0-rc-2
22
===========
33

44
* Supported CDP versions: 85, 92, 93
5+
* Moved NetworkInterceptor to org.opeqa.selenium.devtools
56
* NetworkInterceptor now takes a Filter to allow responses to be
67
captured and rewritten.
78
* Added a "relay" option to better support forwarding sessions to

java/src/org/openqa/selenium/support/devtools/NetworkInterceptor.java renamed to java/src/org/openqa/selenium/devtools/NetworkInterceptor.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
package org.openqa.selenium.support.devtools;
18+
package org.openqa.selenium.devtools;
1919

2020
import org.openqa.selenium.WebDriver;
2121
import org.openqa.selenium.devtools.DevTools;
@@ -57,6 +57,10 @@
5757
*/
5858
public class NetworkInterceptor implements AutoCloseable {
5959

60+
/**
61+
* Return this from a {@link Routable} in order to have the browser
62+
* continue the request unmodified.
63+
*/
6064
public static final HttpResponse PROCEED_WITH_REQUEST = new HttpResponse()
6165
.addHeader("Selenium-Interceptor", "Continue")
6266
.setContent(utf8String("Original request should proceed"));

java/src/org/openqa/selenium/support/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ java_export(
1616
visibility = ["//visibility:public"],
1717
exports = [
1818
":page-factory",
19-
"//java/src/org/openqa/selenium/support/devtools",
2019
"//java/src/org/openqa/selenium/support/events",
2120
"//java/src/org/openqa/selenium/support/locators",
2221
"//java/src/org/openqa/selenium/support/ui:clock",

java/src/org/openqa/selenium/support/devtools/BUILD.bazel

Lines changed: 0 additions & 16 deletions
This file was deleted.

java/test/org/openqa/selenium/devtools/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ java_selenium_test_suite(
1616
deps = [
1717
":test-lib",
1818
"//java/src/org/openqa/selenium/devtools",
19+
"//java/src/org/openqa/selenium/grid/security",
1920
"//java/src/org/openqa/selenium/json",
2021
"//java/src/org/openqa/selenium/remote",
2122
"//java/src/org/openqa/selenium/support",
2223
"//java/test/org/openqa/selenium/environment",
2324
"//java/test/org/openqa/selenium/testing:annotations",
2425
"//java/test/org/openqa/selenium/testing:test-base",
25-
"//java/src/org/openqa/selenium/grid/security",
26+
"//java/test/org/openqa/selenium/testing/drivers",
2627
artifact("com.google.guava:guava"),
2728
artifact("junit:junit"),
2829
artifact("org.assertj:assertj-core"),

java/test/org/openqa/selenium/devtools/CdpFacadeTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.openqa.selenium.remote.http.Contents;
3030
import org.openqa.selenium.remote.http.HttpResponse;
3131
import org.openqa.selenium.remote.http.Route;
32-
import org.openqa.selenium.support.devtools.NetworkInterceptor;
3332
import org.openqa.selenium.testing.NotYetImplemented;
3433
import org.openqa.selenium.testing.drivers.Browser;
3534

java/test/org/openqa/selenium/support/devtools/NetworkInterceptorTest.java renamed to java/test/org/openqa/selenium/devtools/NetworkInterceptorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
package org.openqa.selenium.support.devtools;
18+
package org.openqa.selenium.devtools;
1919

2020
import com.google.common.net.MediaType;
2121
import org.junit.After;
@@ -25,6 +25,7 @@
2525
import org.openqa.selenium.By;
2626
import org.openqa.selenium.WebDriver;
2727
import org.openqa.selenium.devtools.HasDevTools;
28+
import org.openqa.selenium.devtools.NetworkInterceptor;
2829
import org.openqa.selenium.environment.webserver.NettyAppServer;
2930
import org.openqa.selenium.remote.http.Contents;
3031
import org.openqa.selenium.remote.http.Filter;

java/test/org/openqa/selenium/support/devtools/BUILD.bazel

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)