-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NoBestEffortTasksTest for extension loading/messaging.
Adds a browser test that loads an extension, sends it a message, and receives a reply; all while BEST_EFFORT tasks are disabled. This is a regression test for http://crbug.com/177163#c112. Note that the test caught a bug in that BEST_EFFORT task priority was being used when the NetworkService was enabled (different code path than normal). This change fixes that as well. Bug: 177163,924416,925117 Change-Id: I9e4e1874e0f03d5be53224845a4f6fa42ffc68b3 Reviewed-on: https://chromium-review.googlesource.com/c/1427468 Reviewed-by: François Doray <fdoray@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Chris Mumford <cmumford@google.com> Commit-Queue: François Doray <fdoray@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#626544}(cherry picked from commit 60ea85d) Reviewed-on: https://chromium-review.googlesource.com/c/1444993 Reviewed-by: Yuri Wiitala <miu@chromium.org> Cr-Commit-Position: refs/branch-heads/3683@{#55} Cr-Branched-From: e510299-refs/heads/master@{#625896}
- Loading branch information
1 parent
105c463
commit 78c2b66
Showing
4 changed files
with
134 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
chrome/test/data/extensions/no_best_effort_tasks_test_extension/background.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
chrome.runtime.onMessageExternal.addListener((request, from, sendResponse) => { | ||
if (request.ping) { | ||
console.info("Got ping, sending pong..."); | ||
sendResponse({pong: true}); | ||
} | ||
}); |
14 changes: 14 additions & 0 deletions
14
chrome/test/data/extensions/no_best_effort_tasks_test_extension/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8xv6iO+j4kzj1HiBL93+XVJH/CRyAQMUHS/Z0l8nCAzaAFkW/JsNwxJqQhrZspnxLqbQxNncXs6g6bsXAwKHiEs+LSs+bIv0Gc/2ycZdhXJ8GhEsSMakog5dpQd1681c2gLK/8CrAoewE/0GIKhaFcp7a2iZlGh4Am6fgMKy0iQIDAQAB", | ||
"name": "NoBestEffortTasksTest extension", | ||
"version": "1", | ||
"manifest_version": 2, | ||
"description": "Responds to ping messages.", | ||
"background": { | ||
"scripts": ["background.js"], | ||
"persistent": true | ||
}, | ||
"externally_connectable": { | ||
"matches": ["*://*.chromium.org/*"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters