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

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

Issue 1715993002: OOPIF: Fix remote frame navigations from extension pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve mid-air collision in FlagExpectations/site-per-process Created 4 years, 10 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/content_scripts/extension_process/background.js
diff --git a/chrome/test/data/extensions/api_test/content_scripts/extension_process/background.js b/chrome/test/data/extensions/api_test/content_scripts/extension_process/background.js
index d9c65c20bcbf52beb58cf1469976225d41c0432b..4e7094bcd6e7acedda9ba4c6435e1571041d3624 100644
--- a/chrome/test/data/extensions/api_test/content_scripts/extension_process/background.js
+++ b/chrome/test/data/extensions/api_test/content_scripts/extension_process/background.js
@@ -3,17 +3,26 @@
// found in the LICENSE file.
var numPings = 0;
+var base_url;
+
chrome.extension.onRequest.addListener(function(data) {
if (data != "ping")
chrome.test.fail("Unexpected request: " + JSON.stringify(data));
- if (++numPings == 2)
+ if (++numPings == 2) {
+ // Navigate the iframe to another page and check that the content script is
+ // also injected into that page.
+ document.querySelector("iframe").src =
+ base_url + "test_file_with_body.html";
+ } else if (numPings == 3) {
chrome.test.notifyPass();
+ }
});
chrome.test.getConfig(function(config) {
- var test_file_url = "http://localhost:PORT/extensions/test_file.html"
+ base_url = "http://localhost:PORT/extensions/"
.replace(/PORT/, config.testServer.port);
+ var test_file_url = base_url + "test_file.html";
// Add a window.
var w = window.open(test_file_url);
« no previous file with comments | « no previous file | content/browser/frame_host/navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698