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

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

Issue 1908363002: Nuke chrome.embeddedeseach.newTabPage.navigateContentWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | 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 62a673b4b25be06fe337cd98d017cd5052256791..57f5b7ba72a18ae2bfdfd256f0f63378ecafad6d 100644
--- a/chrome/test/data/local_ntp_browsertest.js
+++ b/chrome/test/data/local_ntp_browsertest.js
@@ -87,57 +87,3 @@ function testDoesNotShowFakeboxIfNotGoogle() {
assert(!$('fakebox'));
assert(!$('logo'));
}
-
-
-/**
- * Tests that clicking on a Most Visited link calls navigateContentWindow.
- */
-function testMostVisitedLinkCallsNavigateContentWindow() {
- var ntpHandle = chrome.embeddedSearch.newTabPage;
- var originalNavigateContentWindow = ntpHandle.navigateContentWindow;
-
- var navigateContentWindowCalls = 0;
- ntpHandle.navigateContentWindow = function() {
- navigateContentWindowCalls++;
- }
-
- // Most Visited links have an rid (restricted id).
- var params = { 'rid' : 1 };
- var href = 'file:///some/local/file';
- var title = 'Title';
- var text = 'text';
- var provider = 'foobar';
- var link = createMostVisitedLink(params, href, title, text, provider);
-
- link.click();
-
- ntpHandle.navigateContentWindow = originalNavigateContentWindow;
- assert(navigateContentWindowCalls > 0);
-}
-
-
-/**
- * Tests that clicking on a Most Likely link does not call
- * navigateContentWindow (it's a regular link).
- */
-function testMostLikelyLinkDoesNotCallNavigateContentWindow() {
- var ntpHandle = chrome.embeddedSearch.newTabPage;
- var originalNavigateContentWindow = ntpHandle.navigateContentWindow;
-
- var navigateContentWindowCalls = 0;
- ntpHandle.navigateContentWindow = function() {
- navigateContentWindowCalls++;
- }
-
- var params = {};
- var href = 'https://www.site.com';
- var title = 'Title';
- var text = 'text';
- var provider = 'foobar';
- var link = createMostVisitedLink(params, href, title, text, provider);
-
- link.click();
-
- ntpHandle.navigateContentWindow = originalNavigateContentWindow;
- assert(navigateContentWindowCalls == 0);
-}
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698