Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2713)

Unified Diff: chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/test.js

Issue 226663003: Allow content script insertion on about:-URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetEffectiveDocumentURL to ScriptContext Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/test.js
diff --git a/chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/test.js b/chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/test.js
index b2760dd9c90c3abdb6f38dc88c00e49b32447090..c0a3918299a9ad29802932c16b137cb904fb5f05 100644
--- a/chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/test.js
+++ b/chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/test.js
@@ -3,22 +3,38 @@
// found in the LICENSE file.
chrome.test.getConfig(function(config) {
+ chrome.extension.onRequest.addListener(
+ function(request, sender, sendResponse) {
+ if (request == 'parent')
+ chrome.test.succeed();
+ else
+ chrome.test.fail('Unexpected request: ' + JSON.stringify(request));
+ }
+ );
chrome.test.runTests([
- function onRequest() {
- chrome.extension.onRequest.addListener(
- function(request, sender, sendResponse) {
- if (request == "parent")
- chrome.test.succeed();
- else
- chrome.test.fail("Unexpected request: " + JSON.stringify(request));
- }
- );
+ function testDontInjectInAboutBlankFrame() {
chrome.test.log("Creating tab...");
var test_url =
("http://localhost:PORT/extensions/" +
"test_file_with_about_blank_iframe.html")
.replace(/PORT/, config.testServer.port);
chrome.tabs.create({ url: test_url });
+ },
+ function testDontInjectInAboutSrcdocFrame() {
+ chrome.test.log('Creating tab...');
+ var test_url =
+ ('http://localhost:PORT/extensions/' +
+ 'api_test/webnavigation/srcdoc/a.html')
+ .replace(/PORT/, config.testServer.port);
+ chrome.tabs.create({ url: test_url });
+ },
+ function testDontInjectInNestedAboutFrames() {
+ chrome.test.log('Creating tab...');
+ var test_url =
+ ('http://localhost:PORT/extensions/' +
+ 'test_file_with_about_blank_in_srcdoc.html')
+ .replace(/PORT/, config.testServer.port);
+ chrome.tabs.create({ url: test_url });
}
]);
});

Powered by Google App Engine
This is Rietveld 408576698