Index: chrome/test/data/extensions/api_test/messaging/connect/frame.js |
diff --git a/chrome/test/data/extensions/api_test/messaging/connect/frame.js b/chrome/test/data/extensions/api_test/messaging/connect/frame.js |
index b7a3c4fb1747dc0f0bda3aa77a10234377f84723..a6f9df1c31e4a9432ed68d92de9aed616e49dec9 100644 |
--- a/chrome/test/data/extensions/api_test/messaging/connect/frame.js |
+++ b/chrome/test/data/extensions/api_test/messaging/connect/frame.js |
@@ -9,9 +9,16 @@ chrome.runtime.onConnect.addListener(function(port) { |
// This number is used in test.js to identify messages from this frame. |
var test_id = location.search.slice(-1); |
port.postMessage('from_' + test_id); |
+ } else if (msg.testConnectChildFrameAndNavigate) { |
+ location.search = '?testConnectChildFrameAndNavigateDone'; |
} |
}); |
}); |
// continuation of testSendMessageFromFrame() |
-chrome.runtime.sendMessage({frameUrl: location.href}); |
+if (location.search.lastIndexOf('?testSendMessageFromFrame', 0) === 0) { |
+ chrome.runtime.sendMessage({frameUrl: location.href}); |
+} else if (location.search === '?testConnectChildFrameAndNavigateSetup') { |
+ // continuation of connectChildFrameAndNavigate() 1/2 |
+ chrome.runtime.sendMessage('testConnectChildFrameAndNavigateSetupDone'); |
+} |