|
|
[Extensions] Allow shared resources between tests via _test_resources
Allow tests to override extension protocols so that tests can include
shared resources via chrome-extension://<id>/_test_resources/foo (which
maps to chrome/test/data/extensions/foo). This allows tests to include
utility files in a "#include" style fashion with e.g.
<script src="_test_resources/common_utility.js"></script>
This removes the need to duplicate a bunch of files between different
test extensions. Looking longer term, this could also allow us to
remove a number of our chrome.test methods that are purely JS-based
(we could have them in a common "extension_test.js" file). This is
good for a number of reasons, outlined in the bug.
Set up the overrides and utilize it in the webnavigation API tests,
taking out the common framework.js file for a net savings of around
6k lines.
BUG= 670741
Committed: https://crrev.com/647dc9d1109f473f7cf069c3ba019dee5a4e062c
Cr-Commit-Position: refs/heads/master@{#436172}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+103 lines, -6599 lines) |
Patch |
 |
M |
chrome/browser/extensions/extension_browsertest.h
|
View
|
1
|
3 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/extension_browsertest.cc
|
View
|
1
|
4 chunks |
+46 lines, -0 lines |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/api/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/clientRedirect/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/clientRedirect/test_clientRedirect.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/crash/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/crash/test_crash.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/crossProcess/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/crossProcess/test_crossProcess.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/crossProcessAbort/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/crossProcessAbort/test_crossProcessAbort.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/crossProcessFragment/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/crossProcessFragment/test_crossProcessFragment.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/crossProcessHistory/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/crossProcessHistory/test_crossProcessHistory.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/crossProcessIframe/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/crossProcessIframe/test_crossProcessIframe.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/download/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/download/test_download.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/failures/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/failures/test_failures.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/filtered/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/filtered/test_filtered.html
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/forwardBack/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/forwardBack/test_forwardBack.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A + |
chrome/test/data/extensions/api_test/webnavigation/framework.js
|
View
|
1
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/getFrame/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/history/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/history/test_history.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/iframe/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/iframe/test_iframe.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/openTab/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/openTab/test_openTab.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/prerender/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/prerender/test_prerender.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/referenceFragment/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/referenceFragment/test_referenceFragment.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/requestOpenTab/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/requestOpenTab/test_requestOpenTab.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/serverRedirect/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/serverRedirect/test_serverRedirect.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/serverRedirectSingleProcess/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/serverRedirectSingleProcess/test_serverRedirectSingleProcess.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/simpleLoad/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/simpleLoad/test_simpleLoad.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/srcdoc/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/srcdoc/test_srcdoc.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/targetBlank/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/targetBlank/test_targetBlank.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
chrome/test/data/extensions/api_test/webnavigation/userAction/framework.js
|
View
|
|
1 chunk |
+0 lines, -263 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/api_test/webnavigation/userAction/test_userAction.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
extensions/browser/extension_protocols.h
|
View
|
|
2 chunks |
+14 lines, -1 line |
0 comments
|
Download
|
 |
M |
extensions/browser/extension_protocols.cc
|
View
|
|
3 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
Total messages: 17 (11 generated)
|