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

Unified Diff: chrome/test/data/local_ntp_browsertest.js

Issue 2695813012: [Local NTP] Add an integration test for the most visited iframe (Closed)
Patch Set: rebase Created 3 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 | « chrome/browser/ui/search/local_ntp_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/local_ntp_browsertest.js
diff --git a/chrome/test/data/local_ntp_browsertest.js b/chrome/test/data/local_ntp_browsertest.js
index bb33e34723b31565c1c0e50d3d98153131c9c2c1..f16fc95f3ebf68c612fd34b1f3241e30c2300c1f 100644
--- a/chrome/test/data/local_ntp_browsertest.js
+++ b/chrome/test/data/local_ntp_browsertest.js
@@ -139,7 +139,18 @@ function testMostVisitedContents() {
// Advanced tests are controlled from the native side. The helpers here are
// called from native code to set up the page and to check results.
-function setupAdvancedTest() {
+function handlePostMessage(event) {
+ if (event.data.cmd == 'loaded') {
+ domAutomationController.setAutomationId(0);
+ domAutomationController.send('loaded');
+ }
+}
+
+function setupAdvancedTest(opt_waitForIframeLoaded) {
+ if (opt_waitForIframeLoaded) {
+ window.addEventListener('message', handlePostMessage);
+ }
+
setUp();
initLocalNTP(/*isGooglePage=*/true);
« no previous file with comments | « chrome/browser/ui/search/local_ntp_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698