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

Unified Diff: chrome/test/data/webui/md_history/history_synced_tabs_test.js

Issue 2220303002: MD History: Show 'no synced tabs' when tab sync is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/webui/md_history/history_synced_tabs_test.js
diff --git a/chrome/test/data/webui/md_history/history_synced_tabs_test.js b/chrome/test/data/webui/md_history/history_synced_tabs_test.js
index 17b0c4ebefaa60e25b7555211793709d80fe556b..709a50bccde6fd8a8e562a890d539c911debca39 100644
--- a/chrome/test/data/webui/md_history/history_synced_tabs_test.js
+++ b/chrome/test/data/webui/md_history/history_synced_tabs_test.js
@@ -251,7 +251,7 @@ cr.define('md_history.history_synced_tabs_test', function() {
-1,
element.$['no-synced-tabs'].textContent.indexOf(noSyncedResults));
- var sessionList = [
+ sessionList = [
createSession(
'Nexus 5',
[createWindow(['http://www.google.com', 'http://example.com'])]
@@ -271,6 +271,21 @@ cr.define('md_history.history_synced_tabs_test', function() {
}).then(function() {
// When user signs out, don't show the message.
assertTrue(element.$['no-synced-tabs'].hidden);
+
+ updateSignInState(true);
tsergeant 2016/08/08 04:49:15 Do you mind pulling this out into a separate test(
lshang 2016/08/09 00:39:29 Yep, got rid of the looooooooong test.
+ // Open tabs sync is disabled.
+ setForeignSessions(sessionList, false);
+
+ return flush();
+ }).then(function() {
+ cards = getCards();
+ assertEquals(0, cards.length);
+ // If tab sync is disabled, show 'no synced tabs'.
+ assertFalse(element.$['no-synced-tabs'].hidden);
tsergeant 2016/08/08 04:49:15 Nit: You can pull this code out into a method like
lshang 2016/08/09 00:39:29 Done.
+ var noSyncedResults = loadTimeData.getString('noSyncedResults');
+ assertNotEquals(
+ -1,
+ element.$['no-synced-tabs'].textContent.indexOf(noSyncedResults));
});
});

Powered by Google App Engine
This is Rietveld 408576698