Commit 0c0590bd authored by rbpotter's avatar rbpotter Committed by Commit Bot

PDFViewerUpdate: Run ServiceWorkerJSTests with both flag states

These tests run the basic_test.js tests after loading the service
worker. As a result, now that basic_test.js has been adapted to run
with the flag enabled in
https://chromium-review.googlesource.com/c/chromium/src/+/2376871,
these tests pass with both flag states and just need to be
parameterized so that they are run on the bots with both.

Bug: 1120279
Change-Id: I25628e049946745432277701d555009ecae8fe37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2381061Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802721}
parent 3e4d77f9
......@@ -1065,7 +1065,7 @@ INSTANTIATE_TEST_SUITE_P(/* no prefix */,
// Service worker tests are regression tests for
// https://crbug.com/916514.
class PDFExtensionServiceWorkerJSTest : public PDFExtensionJSTestBase {
class PDFExtensionServiceWorkerJSTest : public PDFExtensionJSTest {
public:
~PDFExtensionServiceWorkerJSTest() override = default;
......@@ -1090,22 +1090,26 @@ class PDFExtensionServiceWorkerJSTest : public PDFExtensionJSTestBase {
// Test navigating to a PDF in the scope of a service worker with no fetch event
// handler.
IN_PROC_BROWSER_TEST_F(PDFExtensionServiceWorkerJSTest, NoFetchHandler) {
IN_PROC_BROWSER_TEST_P(PDFExtensionServiceWorkerJSTest, NoFetchHandler) {
RunServiceWorkerTest("empty.js");
}
// Test navigating to a PDF when a service worker intercepts the request and
// then falls back to network by not calling FetchEvent.respondWith().
IN_PROC_BROWSER_TEST_F(PDFExtensionServiceWorkerJSTest, NetworkFallback) {
IN_PROC_BROWSER_TEST_P(PDFExtensionServiceWorkerJSTest, NetworkFallback) {
RunServiceWorkerTest("network_fallback_worker.js");
}
// Test navigating to a PDF when a service worker intercepts the request and
// provides a response.
IN_PROC_BROWSER_TEST_F(PDFExtensionServiceWorkerJSTest, Interception) {
IN_PROC_BROWSER_TEST_P(PDFExtensionServiceWorkerJSTest, Interception) {
RunServiceWorkerTest("respond_with_fetch_worker.js");
}
INSTANTIATE_TEST_SUITE_P(/* no prefix */,
PDFExtensionServiceWorkerJSTest,
testing::Bool());
// Ensure that the internal PDF plugin application/x-google-chrome-pdf won't be
// loaded if it's not loaded in the chrome extension page.
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsureInternalPluginDisabled) {
......
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