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

Unified Diff: chrome/test/data/extensions/api_test/bindings/frames_before_navigation.html

Issue 2184833002: Revert "Fix extension bindings injection for iframes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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/bindings/frames_before_navigation.html
diff --git a/chrome/test/data/extensions/api_test/bindings/frames_before_navigation.html b/chrome/test/data/extensions/api_test/bindings/frames_before_navigation.html
deleted file mode 100644
index f4140e66725982c4fe786b97cf2c3f862ef1571f..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/api_test/bindings/frames_before_navigation.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!doctype html>
-<html>
-<body>
-<iframe id="frame1" src="chrome-extension://ficgdghpakbhhkmdjamiedmcoobamkoo/public.html"></iframe>
-<iframe id="frame2" src="chrome-extension://ficgdghpakbhhkmdjamiedmcoobamkoo/nonexistent.html"></iframe>
-<script>
-
-// We expect that chrome.runtime.id will not be set in this frame, and that
-// either chrome.runtime.sendMessage is not defined or we're able to call it
-// (but elsewhere in the browser_test that uses this page we check that the
-// message was not actually sent, or at least didn't incorrectly seem to come
-// from the extension ficgdghpakbhhkmdjamiedmcoobamkoo).
-function testFrame(win) {
- var haveId = true;
- var didRun = false;
- try {
- haveId = win.eval('typeof chrome.runtime != "undefined" && ' +
- 'typeof chrome.runtime.id != "undefined"');
- win.eval('typeof chrome.runtime != "undefined" ' +
- '&& chrome.runtime.sendMessage(' +
- '"mlmdejkkkhmhchpmepehbcncoalclded", "evil")');
- didRun = true;
- } catch (e) {
- console.log('caught exception: ' + e);
- }
- return didRun && !haveId;
-}
-
-// Test the two frames (actual page and nonexistent page) that were included in
-// the original html document.
-var frame1Success = testFrame(document.getElementById('frame1').contentWindow);
-var frame2Success = testFrame(document.getElementById('frame2').contentWindow);
-
-// Now test two frames that get dynamically created and added to the DOM, again
-// one actual page and one nonexistent.
-var frame3 = document.createElement('iframe');
-frame3.src = 'chrome-extension://ficgdghpakbhhkmdjamiedmcoobamkoo/public.html';
-document.body.appendChild(frame3);
-var frame3Success = testFrame(frame3.contentWindow);
-
-var frame4 = document.createElement('iframe');
-frame4.src =
- 'chrome-extension://ficgdghpakbhhkmdjamiedmcoobamkoo/nonexistent.html';
-document.body.appendChild(frame4);
-var frame4Success = testFrame(frame4.contentWindow);
-
-// Finally, test against two newly opened windows.
-var newWin1 = window.open(
- 'chrome-extension://ficgdghpakbhhkmdjamiedmcoobamkoo/public.html');
-var newWindow1Success = testFrame(newWin1);
-
-var newWin2 = window.open(
- 'chrome-extension://ficgdghpakbhhkmdjamiedmcoobamkoo/nonexistent.html');
-var newWindow2Success = testFrame(newWin2);
-
-function getResult() {
- window.domAutomationController.send(
- frame1Success && frame2Success && frame3Success &&
- frame4Success && newWindow1Success && newWindow2Success);
-}
-
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698