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

Side by Side Diff: chrome/test/data/local_ntp_browsertest.js

Issue 178253008: Redoing Issue 36073011: Allowing file:/// in Instant Extended's Most Visited links. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused consts. Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 /** 6 /**
7 * @fileoverview Tests the local NTP. 7 * @fileoverview Tests the local NTP.
8 */ 8 */
9 9
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 /** 80 /**
81 * Tests that non-Google NTPs do not show a fakebox. 81 * Tests that non-Google NTPs do not show a fakebox.
82 */ 82 */
83 function testDoesNotShowFakeboxIfNotGoogle() { 83 function testDoesNotShowFakeboxIfNotGoogle() {
84 var localNTP = LocalNTP(); 84 var localNTP = LocalNTP();
85 configData.isGooglePage = false; 85 configData.isGooglePage = false;
86 localNTP.init(); 86 localNTP.init();
87 assert(!$('fakebox')); 87 assert(!$('fakebox'));
88 assert(!$('logo')); 88 assert(!$('logo'));
89 } 89 }
90
91
92 /**
93 * Tests that clicking on a Most Visited link calls navigateContentWindow.
94 */
95 function testMostVisitedLinkCallsNavigateContentWindow() {
96 var ntpHandle = chrome.embeddedSearch.newTabPage;
97 var originalNavigateContentWindow = ntpHandle.navigateContentWindow;
98
99 var navigateContentWindowCalls = 0;
100 ntpHandle.navigateContentWindow = function() {
101 navigateContentWindowCalls++;
102 }
103
104 var params = {};
105 var href = 'file:///some/local/file';
106 var title = 'Title';
107 var text = 'text';
108 var provider = 'foobar';
109 var link = createMostVisitedLink(params, href, title, text, provider);
110
111 link.click();
112
113 ntpHandle.navigateContentWindow = originalNavigateContentWindow;
114 assert(navigateContentWindowCalls > 0);
115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698